code: def tearDownClass(cls):
      # stop possible active_spark_context
      from pyspark import SparkContext
      from bigdl.orca.ray import OrcaRayContext
  
      if SparkContext._active_spark_context is not None:
          print("Stopping spark_orca context")
          sc = SparkContext.getOrCreate()
          if sc.getConf().get("spark.master").startswith("spark://"):
              from bigdl.dllib.nncontext import stop_spark_standalone
  
              stop_spark_standalone()
          sc.stop()
      if OrcaRayContext._active_ray_context is not None:
          print("Stopping ray_orca context")
          ray_ctx = OrcaRayContext.get(initialize=False)
          if ray_ctx.initialized:
              ray_ctx.stop()
  
file_path: BigDL/python/chronos/test/bigdl/chronos/forecaster/test_tcmf_forecaster.py
imports: import pytest
  import numpy
  from bigdl.chronos.utils import LazyImport
  from unittest import TestCase
  import tempfile
  import pandas
  from ..None import op_distributed, op_torch, op_diff_set_all
label_desc: Use image node_id 3 for calling the TestChronosModelTCMFForecaster obj's underlying member method code with example usage: obj.tearDownClass(cls) without return types