nodes: 0, module; 1, function_definition; 2, function_name:sort_by; 3, parameters; 4, block; 5, identifier:self; 6, identifier:sf; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""
      Determines how to sort search results. Available sorting methods are
      sort.SCORE, sort.COMMENTS, sort.HEIGHT, sort.RELEVANCE, sort.CREATED_AT,
      and sort.RANDOM; default is sort.CREATED_AT.
      """; 11, assignment; 12, call; 13, identifier:params; 14, call; 15, attribute; 16, argument_list; 17, identifier:join_params; 18, argument_list; 19, identifier:self; 20, identifier:__class__; 21, dictionary_splat; 22, attribute; 23, dictionary; 24, identifier:params; 25, identifier:self; 26, identifier:parameters; 27, pair; 28, string:"sf"; 29, identifier:sf
code: def sort_by(self, sf):
      """
      Determines how to sort search results. Available sorting methods are
      sort.SCORE, sort.COMMENTS, sort.HEIGHT, sort.RELEVANCE, sort.CREATED_AT,
      and sort.RANDOM; default is sort.CREATED_AT.
      """
      params = join_params(self.parameters, {"sf": sf})
  
      return self.__class__(**params)