code: def stop(self):
          
          self._sc.stop()
          # We should clean the default session up. See SPARK-23228.
          self._jvm.SparkSession.clearDefaultSession()
          self._jvm.SparkSession.clearActiveSession()
          SparkSession._instantiatedSession = None
          SparkSession._activeSession = None
docs: Stop the underlying :class:`SparkContext`.