code: def stop(self, stopSparkContext=True, stopGraceFully=False):
          
          self._jssc.stop(stopSparkContext, stopGraceFully)
          StreamingContext._activeContext = None
          if stopSparkContext:
              self._sc.stop()
docs: Stop the execution of the streams, with option of ensuring all
          received data has been processed.
  
          @param stopSparkContext: Stop the associated SparkContext or not
          @param stopGracefully: Stop gracefully by waiting for the processing
                                of all received data to be completed