nodes: 0, module; 1, function_definition; 2, function_name:validate_sort_fields; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, if_statement; 9, return_statement; 10, comment:""" Take care of sorting.
          """; 11, assignment; 12, comparison_operator:sort_fields == '*'; 13, block; 14, call; 15, identifier:sort_fields; 16, call; 17, identifier:sort_fields; 18, string; 19, expression_statement; 20, attribute; 21, argument_list; 22, attribute; 23, argument_list; 24, string_content:*; 25, assignment; 26, identifier:formatting; 27, identifier:validate_sort_fields; 28, boolean_operator; 29, string; 30, identifier:join; 31, attribute; 32, identifier:sort_fields; 33, call; 34, identifier:sort_fields; 35, attribute; 36, string_content:,; 37, attribute; 38, identifier:sort_fields; 39, attribute; 40, argument_list; 41, identifier:config; 42, identifier:sort_fields; 43, identifier:self; 44, identifier:options; 45, identifier:self; 46, identifier:get_output_fields
code: def validate_sort_fields(self):
          """ Take care of sorting.
          """
          sort_fields = ','.join(self.options.sort_fields)
          if sort_fields == '*':
              sort_fields = self.get_output_fields()
  
          return formatting.validate_sort_fields(sort_fields or config.sort_fields)