code: def getOrCreateSparkSession(appName):
      return (
          SparkSession.builder.master("local[2]")
          .config(
              "spark.jars.packages",
              "ai.catboost:catboost-spark_2.4_2.11:1.2.2",
          )
          .appName(appName)
          .getOrCreate()
      )
  
file_path: catboost/catboost/spark/catboost4j-spark/core/src/test/python/test_helpers.py
imports: import inspect
  import numpy
  from pyspark.sql import SparkSession
  from pyspark.sql.types import *
label_desc: Use image node_id 2 for calling a global function with example usage: getOrCreateSparkSession(appName) and returns: SparkSession