nodes: 0, module; 1, function_definition; 2, function_name:argsort; 3, parameters; 4, block; 5, list_splat_pattern; 6, dictionary_splat_pattern; 7, expression_statement; 8, if_statement; 9, identifier:args; 10, identifier:kwargs; 11, comment:"""
      like np.argsort but for lists
  
      Args:
          *args: multiple lists to sort by
          **kwargs:
              reverse (bool): sort order is descending if True else acscending
  
      CommandLine:
          python -m utool.util_list argsort
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_list import *  # NOQA
          >>> result = ut.argsort({'a': 3, 'b': 2, 'c': 100})
          >>> print(result)
      """; 12, boolean_operator; 13, block; 14, else_clause; 15, comparison_operator:len(args) == 1; 16, call; 17, expression_statement; 18, expression_statement; 19, expression_statement; 20, return_statement; 21, block; 22, call; 23, integer:1; 24, identifier:isinstance; 25, argument_list; 26, assignment; 27, assignment; 28, assignment; 29, call; 30, expression_statement; 31, return_statement; 32, identifier:len; 33, argument_list; 34, subscript; 35, identifier:dict; 36, identifier:dict_; 37, subscript; 38, identifier:index_list; 39, call; 40, identifier:value_list; 41, call; 42, identifier:sortedby2; 43, argument_list; 44, assignment; 45, call; 46, identifier:args; 47, identifier:args; 48, integer:0; 49, identifier:args; 50, integer:0; 51, identifier:list; 52, argument_list; 53, identifier:list; 54, argument_list; 55, identifier:index_list; 56, identifier:value_list; 57, identifier:index_list; 58, call; 59, identifier:sortedby2; 60, argument_list; 61, call; 62, call; 63, identifier:list; 64, argument_list; 65, identifier:index_list; 66, list_splat; 67, dictionary_splat; 68, attribute; 69, argument_list; 70, attribute; 71, argument_list; 72, call; 73, identifier:args; 74, identifier:kwargs; 75, identifier:dict_; 76, identifier:keys; 77, identifier:dict_; 78, identifier:values; 79, identifier:range; 80, argument_list; 81, call; 82, identifier:len; 83, argument_list; 84, subscript; 85, identifier:args; 86, integer:0
code: def argsort(*args, **kwargs):
      """
      like np.argsort but for lists
  
      Args:
          *args: multiple lists to sort by
          **kwargs:
              reverse (bool): sort order is descending if True else acscending
  
      CommandLine:
          python -m utool.util_list argsort
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_list import *  # NOQA
          >>> result = ut.argsort({'a': 3, 'b': 2, 'c': 100})
          >>> print(result)
      """
      if len(args) == 1 and isinstance(args[0], dict):
          dict_ = args[0]
          index_list = list(dict_.keys())
          value_list = list(dict_.values())
          return sortedby2(index_list, value_list)
      else:
          index_list = list(range(len(args[0])))
          return sortedby2(index_list, *args, **kwargs)