code: def createRawPool(
      appName,  #:  String,
      srcDataSchema,  #: Seq[StructField],
      srcData,  #: Seq[Row],
      columnNames,  #: Map[String, String] // standard column name to name of column in the dataset
      srcPairsData=None,  # Seq[Row]
  ):
      spark = test_helpers.getOrCreateSparkSession(
          test_helpers.getCurrentMethodName()
      )
      import catboost_spark
  
      df = spark.createDataFrame(
          spark.sparkContext.parallelize(srcData),
          StructType(srcDataSchema),
      )
  
      if srcPairsData:
          pairsDataSchema = StructType(
              [
                  StructField("groupId", LongType(), False),
                  StructField("winnerId", IntegerType(), False),
                  StructField("loserId", IntegerType(), False),
              ]
          )
          pairsDf = spark.createDataFrame(
              spark.sparkContext.parallelize(srcPairsData),
              pairsDataSchema,
          )
          pool = catboost_spark.Pool(df, pairsDf)
      else:
          pool = catboost_spark.Pool(df)
  
      if "features" in columnNames:
          pool = pool.setFeaturesCol(columnNames["features"])
      if "groupId" in columnNames:
          pool = pool.setGroupIdCol(columnNames["groupId"])
      if "sampleId" in columnNames:
          pool = pool.setSampleIdCol(columnNames["sampleId"])
      if "subgroupId" in columnNames:
          pool = pool.setSubgroupIdCol(columnNames["subgroupId"])
      if "weight" in columnNames:
          pool = pool.setWeightCol(columnNames["weight"])
      if "groupWeight" in columnNames:
          pool = pool.setGroupWeightCol(columnNames["groupWeight"])
      return pool
  
file_path: catboost/catboost/spark/catboost4j-spark/core/src/test/python/pool_test_helpers.py
imports: import tempfile
  from pyspark.ml.linalg import *
  from pyspark.ml.param import *
  from pyspark.sql import *
  from pyspark.sql.types import *
  import test_helpers
label_desc: Use image node_id 5 for calling a global function with example usage: createRawPool(appName, srcDataSchema, srcData, columnNames, srcPairsData) and returns: pool