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()
  
imports: import pytest
  import numpy
  import pandas
  import random
  import os
  from unittest import TestCase
  from bigdl.chronos.data import TSDataset
  from bigdl.chronos.utils import LazyImport
  from ...None import op_torch, op_distributed
  from pandas.testing import assert_frame_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 3 for calling the TestXShardsTSDataset obj's underlying member method code with example usage: obj.tearDownClass(cls) without return types