nodes: 0, module; 1, function_definition; 2, function_name:_argsort; 3, parameters; 4, block; 5, identifier:y_score; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, return_statement; 12, identifier:k; 13, None; 14, comment:"""
      Returns the indexes in descending order of the top k score
          or all scores if k is None
      """; 15, assignment; 16, assignment; 17, comparison_operator:k is not None; 18, block; 19, identifier:argsort; 20, identifier:ranks; 21, call; 22, identifier:argsort; 23, subscript; 24, identifier:k; 25, None; 26, expression_statement; 27, attribute; 28, argument_list; 29, identifier:ranks; 30, slice; 31, assignment; 32, identifier:y_score; 33, identifier:argsort; 34, unary_operator; 35, identifier:argsort; 36, subscript; 37, integer:1; 38, identifier:argsort; 39, slice; 40, integer:0; 41, identifier:k
code: def _argsort(y_score, k=None):
      """
      Returns the indexes in descending order of the top k score
          or all scores if k is None
      """
      ranks = y_score.argsort()
      argsort = ranks[::-1]
      if k is not None:
          argsort = argsort[0:k]
  
      return argsort