code: def union(self, other):
          
          def union_rdds(rdd_a, rdd_b):
              return self._context._context.union((rdd_a, rdd_b))
  
          return self.transformWith(union_rdds, other)
docs: Union of two DStreams.
  
          :param DStream other: Another DStream.
  
  
          Example:
  
          >>> import pysparkling
          >>> sc = pysparkling.Context()
          >>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
          >>> odd = ssc.queueStream([[1], [3], [5]])
          >>> even = ssc.queueStream([[2], [4], [6]])
          >>> (
          ...     odd.union(even)
          ...     .foreachRDD(lambda rdd: print(rdd.collect()))
          ... )
          >>> ssc.start()
          >>> ssc.awaitTermination(0.35)
          [1, 2]
          [3, 4]
          [5, 6]