code: def getOrCreate(cls, conf=None):
          
          with SparkContext._lock:
              if SparkContext._active_spark_context is None:
                  SparkContext(conf=conf or SparkConf())
              return SparkContext._active_spark_context
docs: Get or instantiate a SparkContext and register it as a singleton object.
  
          :param conf: SparkConf (optional)