nodes: 0, module; 1, function_definition; 2, function_name:reduce_sort; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, if_statement; 10, if_statement; 11, return_statement; 12, identifier:js_cmp; 13, None; 14, identifier:options; 15, None; 16, comment:"""
          Adds the Javascript built-in ``Riak.reduceSort`` to the query
          as a reduce phase.
  
          :param js_cmp: A Javascript comparator function as specified by
            Array.sort()
          :type js_cmp: string
          :param options: phase options, containing 'language', 'keep'
            flag, and/or 'arg'.
          :type options: dict
          """; 17, comparison_operator:options is None; 18, block; 19, identifier:js_cmp; 20, block; 21, call; 22, identifier:options; 23, None; 24, expression_statement; 25, expression_statement; 26, attribute; 27, argument_list; 28, assignment; 29, assignment; 30, identifier:self; 31, identifier:reduce; 32, string:"Riak.reduceSort"; 33, keyword_argument; 34, identifier:options; 35, call; 36, subscript; 37, identifier:js_cmp; 38, identifier:options; 39, identifier:options; 40, identifier:dict; 41, argument_list; 42, identifier:options; 43, string; 44, string_content:arg
code: def reduce_sort(self, js_cmp=None, options=None):
          """
          Adds the Javascript built-in ``Riak.reduceSort`` to the query
          as a reduce phase.
  
          :param js_cmp: A Javascript comparator function as specified by
            Array.sort()
          :type js_cmp: string
          :param options: phase options, containing 'language', 'keep'
            flag, and/or 'arg'.
          :type options: dict
          """
          if options is None:
              options = dict()
  
          if js_cmp:
              options['arg'] = js_cmp
  
          return self.reduce("Riak.reduceSort", options=options)