nodes: 0, module; 1, function_definition; 2, function_name:rank; 3, parameters; 4, block; 5, identifier:keys; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, identifier:axis; 11, attribute; 12, comment:"""where each item is in the pecking order.
  
      Parameters
      ----------
      keys : indexable object
  
      Returns
      -------
      ndarray, [keys.size], int
          unique integers, ranking the sorting order
  
      Notes
      -----
      we should have that index.sorted[index.rank] == keys
      """; 13, assignment; 14, attribute; 15, identifier:semantics; 16, identifier:axis_default; 17, identifier:index; 18, call; 19, identifier:index; 20, identifier:rank; 21, identifier:as_index; 22, argument_list; 23, identifier:keys; 24, identifier:axis
code: def rank(keys, axis=semantics.axis_default):
      """where each item is in the pecking order.
  
      Parameters
      ----------
      keys : indexable object
  
      Returns
      -------
      ndarray, [keys.size], int
          unique integers, ranking the sorting order
  
      Notes
      -----
      we should have that index.sorted[index.rank] == keys
      """
      index = as_index(keys, axis)
      return index.rank