nodes: 0, module; 1, function_definition; 2, function_name:sortBy; 3, parameters; 4, block; 5, identifier:self; 6, list_splat_pattern; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, identifier:args; 12, string; 13, assignment; 14, identifier:k; 15, identifier:args; 16, block; 17, identifier:self; 18, string_content:sort results by given criteria; 19, identifier:criteria; 20, list; 21, if_statement; 22, string; 23, string; 24, comparison_operator:k in criteria; 25, block; 26, string_content:seeds; 27, string_content:size; 28, identifier:k; 29, identifier:criteria; 30, expression_statement; 31, assignment; 32, attribute; 33, call; 34, identifier:self; 35, identifier:results; 36, identifier:sorted; 37, argument_list; 38, attribute; 39, keyword_argument; 40, keyword_argument; 41, identifier:self; 42, identifier:results; 43, identifier:key; 44, call; 45, identifier:reverse; 46, True; 47, identifier:attrgetter; 48, argument_list; 49, identifier:k
code: def sortBy(self, *args):
          '''sort results by given criteria'''
          criteria = ['seeds', 'size']
          for k in args:
              if k in criteria:
                  self.results = sorted(
                      self.results, key=attrgetter(k), reverse=True)
          return self