nodes: 0, module; 1, function_definition; 2, function_name:sortBy; 3, parameters; 4, block; 5, identifier:self; 6, identifier:keyfunc; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, return_statement; 11, identifier:ascending; 12, True; 13, identifier:numPartitions; 14, None; 15, comment:"""
          Sorts this RDD by the given keyfunc
  
          >>> tmp = [('a', 1), ('b', 2), ('1', 3), ('d', 4), ('2', 5)]
          >>> sc.parallelize(tmp).sortBy(lambda x: x[0]).collect()
          [('1', 3), ('2', 5), ('a', 1), ('b', 2), ('d', 4)]
          >>> sc.parallelize(tmp).sortBy(lambda x: x[1]).collect()
          [('a', 1), ('b', 2), ('1', 3), ('d', 4), ('2', 5)]
          """; 16, call; 17, attribute; 18, argument_list; 19, call; 20, identifier:values; 21, attribute; 22, argument_list; 23, call; 24, identifier:sortByKey; 25, identifier:ascending; 26, identifier:numPartitions; 27, attribute; 28, argument_list; 29, identifier:self; 30, identifier:keyBy; 31, identifier:keyfunc
code: def sortBy(self, keyfunc, ascending=True, numPartitions=None):
          """
          Sorts this RDD by the given keyfunc
  
          >>> tmp = [('a', 1), ('b', 2), ('1', 3), ('d', 4), ('2', 5)]
          >>> sc.parallelize(tmp).sortBy(lambda x: x[0]).collect()
          [('1', 3), ('2', 5), ('a', 1), ('b', 2), ('d', 4)]
          >>> sc.parallelize(tmp).sortBy(lambda x: x[1]).collect()
          [('a', 1), ('b', 2), ('1', 3), ('d', 4), ('2', 5)]
          """
          return self.keyBy(keyfunc).sortByKey(ascending, numPartitions).values()