nodes: 0, module; 1, function_definition; 2, function_name:countByValue; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, return_statement; 8, comment:"""Apply countByValue to every RDD.abs
  
          :rtype: DStream
  
          .. warning::
              Implemented as a local operation.
  
  
          Example:
  
          >>> import pysparkling
          >>> sc = pysparkling.Context()
          >>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
          >>> (
          ...     ssc
          ...     .queueStream([[1, 1, 5, 5, 5, 2]])
          ...     .countByValue()
          ...     .foreachRDD(lambda rdd: print(sorted(rdd.collect())))
          ... )
          >>> ssc.start()
          >>> ssc.awaitTermination(0.15)
          [(1, 2), (2, 1), (5, 3)]
          """; 9, call; 10, attribute; 11, argument_list; 12, identifier:self; 13, identifier:transform; 14, lambda; 15, lambda_parameters; 16, call; 17, identifier:rdd; 18, attribute; 19, argument_list; 20, attribute; 21, identifier:parallelize; 22, call; 23, attribute; 24, identifier:_context; 25, attribute; 26, argument_list; 27, identifier:self; 28, identifier:_context; 29, call; 30, identifier:items; 31, attribute; 32, argument_list; 33, identifier:rdd; 34, identifier:countByValue
code: def countByValue(self):
          """Apply countByValue to every RDD.abs
  
          :rtype: DStream
  
          .. warning::
              Implemented as a local operation.
  
  
          Example:
  
          >>> import pysparkling
          >>> sc = pysparkling.Context()
          >>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
          >>> (
          ...     ssc
          ...     .queueStream([[1, 1, 5, 5, 5, 2]])
          ...     .countByValue()
          ...     .foreachRDD(lambda rdd: print(sorted(rdd.collect())))
          ... )
          >>> ssc.start()
          >>> ssc.awaitTermination(0.15)
          [(1, 2), (2, 1), (5, 3)]
          """
          return self.transform(
              lambda rdd: self._context._context.parallelize(
                  rdd.countByValue().items()))