code: def setUpClass(cls) -> None:
      if not os.path.exists(resource_path):
          os.mkdir(resource_path)
  
      # set key path
      primary_key_path = os.path.join(resource_path, "primaryKey")
  
      # init a SparkContext
      conf = {
          "spark.app.name": "PPML TEST",
          "spark.hadoop.io.compression.codecs": "com.intel.analytics.bigdl.ppml.crypto.CryptoCodec",
          "spark.bigdl.primaryKey.defaultKey.kms.type": "SimpleKeyManagementService",
          "spark.bigdl.primaryKey.defaultKey.kms.appId": cls.app_id,
          "spark.bigdl.primaryKey.defaultKey.kms.apiKey": cls.app_key,
          "spark.bigdl.primaryKey.defaultKey.material": primary_key_path,
      }
      init_spark_on_local(conf=conf)
  
      # generate primaryKey
      init_keys(cls.app_id, cls.app_key, primary_key_path)
  
      args = {
          "kms_type": "SimpleKeyManagementService",
          "app_id": cls.app_id,
          "api_key": cls.app_key,
          "primary_key_material": primary_key_path,
      }
  
      # init a PPMLContext
      cls.sc = PPMLContext("testApp", args)
  
      # generate a DataFrame for test
      data = [
          ("Java", "20000"),
          ("Python", "100000"),
          ("Scala", "3000"),
      ]
      cls.df = cls.sc.spark.createDataFrame(data).toDF(
          "language", "user"
      )
      cls.df = cls.df.repartition(1)
      cls.data_content = "\n".join(
          [
              str(v["language"]) + "," + str(v["user"])
              for v in cls.df.orderBy("language").collect()
          ]
      )
  
file_path: BigDL/python/ppml/test/bigdl/ppml/test_ppml_context.py
imports: import unittest
  import os
  import random
  import shutil
  from bigdl.ppml.ppml_context import *
  from pyspark.sql.types import StructType, StructField, StringType
label_desc: Use image node_id 1 for calling the TestPPMLContext obj's underlying member method code with example usage: obj.setUpClass(cls) without return types