code: def test_spark_session_factory_with_iceberg_config(
      mock_spark_context,
  ):
      mock_env_helper = Mock()
      mock_spark_context.side_effect = [Mock(), Mock()]
  
      spark_session_factory = SparkSessionFactory(mock_env_helper)
  
      spark_session = spark_session_factory.spark_session
      spark_session_with_iceberg_config = (
          spark_session_factory.get_spark_session_with_iceberg_config(
              "warehouse", "catalog"
          )
      )
  
      assert spark_session is spark_session_with_iceberg_config
      mock_spark_conf = spark_session._jvm.SparkSession().conf()
      expected_calls = [
          call.set(cfg[0], cfg[1])
          for cfg in spark_session_factory._get_iceberg_configs(
              "warehouse", "catalog"
          )
      ]
  
      mock_spark_conf.assert_has_calls(expected_calls, any_order=False)
  
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 5 for calling a global function with example usage: test_spark_session_factory_with_iceberg_config(mock_spark_context) without return types