code: def setup_class(cls):
      cls.num_total_cpus = 2
      cls.num_total_gpus = 0
      cls.num_cpus_per_spark_task = 1
      cls.num_gpus_per_spark_task = 0
      cls.max_spark_tasks = 2
      os.environ["SPARK_WORKER_CORES"] = "2"
      cls.spark = (
          SparkSession.builder.master("local-cluster[1, 2, 1024]")
          .config("spark.task.cpus", "1")
          .config("spark.task.maxFailures", "1")
          .config(
              "spark.executorEnv.RAY_ON_SPARK_WORKER_CPU_CORES", "2"
          )
          .getOrCreate()
      )
  
imports: import os
  import shutil
  import tempfile
  import socket
  import threading
  import re
  import pytest
  import sys
  from unittest import mock
  from abc import ABC
  import ray
  import ray.util.spark.cluster_init
  from ray.util.spark import setup_ray_cluster, shutdown_ray_cluster, setup_global_ray_cluster, MAX_NUM_WORKER_NODES
  from ray.util.spark.utils import is_port_in_use, _calc_mem_per_ray_worker_node
  from pyspark.sql import SparkSession
  import time
  import logging
  from contextlib import contextmanager
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 1 for calling the TestBasicSparkCluster obj's underlying member method code with example usage: obj.setup_class(cls) without return types