code: def test_spark_session_factory_same_instance(mock_spark_context):
      mock_env_helper = Mock()
      mock_spark_context.side_effect = [Mock(), Mock()]
  
      spark_session_factory = SparkSessionFactory(mock_env_helper)
  
      a_reference = spark_session_factory.spark_session
      another_reference = spark_session_factory.spark_session
  
      assert a_reference is another_reference
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/feature_processor/test_spark_session_factory.py
imports: from __future__ import absolute_import
  import feature_store_pyspark
  import pytest
  from mock import Mock, patch, call
  from sagemaker.feature_store.feature_processor._spark_factory import FeatureStoreManagerFactory, SparkSessionFactory
label_desc: Use image node_id 6 for calling a global function with example usage: test_spark_session_factory_same_instance(mock_spark_context) without return types