code: def writeToTempFile(str):
      path = tempfile.mkstemp(prefix="PoolTest_")[1]
      with open(path, "w") as f:
          f.write(str)
      return path
  
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 2 for calling a global function with example usage: writeToTempFile(str) and returns: path