code: def set_sc(cls, master=None, appName=None, sparkHome=None, pyFiles=None, environment=None,
                 batchSize=0, serializer=PickleSerializer(), conf=None, gateway=None, jsc=None,
                 profiler_cls=BasicProfiler):
          
          if cls.sc is not None:
              cls.sc.stop()
          cls.sc = SparkContext(master, appName, sparkHome, pyFiles, environment, batchSize,
                                serializer,
                                conf, gateway, jsc, profiler_cls)
          cls.__init_spark()
docs: Creates and initializes a new `SparkContext` (the old one will be stopped).
          Argument signature is copied from `pyspark.SparkContext
          <https://spark.apache.org/docs/latest/api/python/pyspark.html#pyspark.SparkContext>`_.