def METHOD_NAME(
    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