code: def setUpClass(cls):
      (
          cls.gpu_discovery_script_file_name,
          cls.mnist_dir_path,
      ) = set_up_test_dirs()
      builder = SparkSession.builder.appName(cls.__name__)
      for k, v in get_local_mode_conf().items():
          builder = builder.config(k, v)
  
      builder = builder.config(
          "spark.driver.resource.gpu.discoveryScript",
          cls.gpu_discovery_script_file_name,
      )
      cls.spark = builder.remote("local[4]").getOrCreate()
  
imports: import os
  import shutil
  import unittest
  from pyspark.sql import SparkSession
  from pyspark.ml.torch.tests.test_distributor import TorchDistributorBaselineUnitTestsMixin, TorchDistributorLocalUnitTestsMixin, TorchDistributorDistributedUnitTestsMixin, TorchWrapperUnitTestsMixin, set_up_test_dirs, get_local_mode_conf, get_distributed_mode_conf
label_desc: Use image node_id 1 for calling the TorchDistributorLocalUnitTestsIIOnConnect obj's underlying member method code with example usage: obj.setUpClass(cls) without return types