nodes: 0, module; 1, function_definition; 2, function_name:sort_data; 3, parameters; 4, block; 5, identifier:data; 6, identifier:cols; 7, expression_statement; 8, return_statement; 9, comment:"""Sort `data` rows and order columns"""; 10, call; 11, attribute; 12, argument_list; 13, subscript; 14, identifier:reset_index; 15, keyword_argument; 16, call; 17, binary_operator:cols + ['value']; 18, identifier:drop; 19, True; 20, attribute; 21, argument_list; 22, identifier:cols; 23, list; 24, identifier:data; 25, identifier:sort_values; 26, identifier:cols; 27, string; 28, string_content:value
code: def sort_data(data, cols):
      """Sort `data` rows and order columns"""
      return data.sort_values(cols)[cols + ['value']].reset_index(drop=True)