class_docstr: Base class for unittests using Spark.  Sets up and tears down a cluster per test class
code: def setUpClass(cls):
      master = os.getenv("MASTER")
      assert (
          master is not None
      ), "Please start a Spark standalone cluster and export MASTER to your env."
  
      num_workers = os.getenv("SPARK_WORKER_INSTANCES")
      assert (
          num_workers is not None
      ), "Please export SPARK_WORKER_INSTANCES to your env."
      cls.num_workers = int(num_workers)
  
      spark_jars = os.getenv("SPARK_CLASSPATH")
      assert (
          spark_jars
      ), "Please add path to tensorflow/ecosystem/hadoop jar to SPARK_CLASSPATH."
  
      cls.conf = (
          SparkConf()
          .set("spark.jars", spark_jars)
          .set(
              "spark.scheduler.barrier.maxConcurrentTasksCheck.maxFailures",
              3,
          )
      )
  
      cls.sc = SparkContext(master, cls.__name__, conf=cls.conf)
      cls.spark = SparkSession.builder.getOrCreate()
  
file_path: TensorFlowOnSpark/tests/test.py
imports: import os
  import unittest
  from pyspark import SparkConf, SparkContext
  from pyspark.sql import SparkSession
label_desc: Use image node_id 1 for calling the SparkTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types