nodes: 0, module; 1, function_definition; 2, function_name:reduceByKey; 3, parameters; 4, block; 5, identifier:self; 6, identifier:func; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, return_statement; 11, identifier:numPartitions; 12, None; 13, identifier:partitionFunc; 14, identifier:portable_hash; 15, comment:"""
          Merge the values for each key using an associative and commutative reduce function.
  
          This will also perform the merging locally on each mapper before
          sending results to a reducer, similarly to a "combiner" in MapReduce.
  
          Output will be partitioned with C{numPartitions} partitions, or
          the default parallelism level if C{numPartitions} is not specified.
          Default partitioner is hash-partition.
  
          >>> from operator import add
          >>> rdd = sc.parallelize([("a", 1), ("b", 1), ("a", 1)])
          >>> sorted(rdd.reduceByKey(add).collect())
          [('a', 2), ('b', 1)]
          """; 16, call; 17, attribute; 18, argument_list; 19, identifier:self; 20, identifier:combineByKey; 21, lambda; 22, identifier:func; 23, identifier:func; 24, identifier:numPartitions; 25, identifier:partitionFunc; 26, lambda_parameters; 27, identifier:x; 28, identifier:x
code: def reduceByKey(self, func, numPartitions=None, partitionFunc=portable_hash):
          """
          Merge the values for each key using an associative and commutative reduce function.
  
          This will also perform the merging locally on each mapper before
          sending results to a reducer, similarly to a "combiner" in MapReduce.
  
          Output will be partitioned with C{numPartitions} partitions, or
          the default parallelism level if C{numPartitions} is not specified.
          Default partitioner is hash-partition.
  
          >>> from operator import add
          >>> rdd = sc.parallelize([("a", 1), ("b", 1), ("a", 1)])
          >>> sorted(rdd.reduceByKey(add).collect())
          [('a', 2), ('b', 1)]
          """
          return self.combineByKey(lambda x: x, func, func, numPartitions, partitionFunc)