code: def getDataForComparison(data, sortByFields):
      if not sortByFields:
          return data
      else:
          return data.sort(sortByFields).collect()
  
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 3 for calling a global function with example usage: getDataForComparison(data, sortByFields) and returns: data, data