code: def get_spark_session(
      config: Optional[Dict[str, str]] = DEFAULT_SPARK_CONFIG
  ):
      logger.info(f"Building with config: \n{pprint.pformat(config)}")
      spark = SparkSession.builder.enableHiveSupport()
      if config is not None:
          for k, v in config.items():
              spark = spark.config(k, v)
      spark = spark.getOrCreate()
      spark.sparkContext.setLogLevel("ERROR")
      return spark
  
file_path: ReAgent/reagent/data/spark_utils.py
imports: import logging
  import pprint
  from os.path import abspath, dirname, join
  from typing import Dict, Optional
  import reagent
  from pyspark.sql import SparkSession
  from pyspark.sql.functions import col
label_desc: Use image node_id 1 for calling a global function with example usage: get_spark_session(config) and returns: spark