code: def _scitype_from_class(obj):
      """Return scitype string given class or object."""
      if obj is None:
          raise ValueError("obj must not be None")
      if not isclass(obj):
          obj = type(obj)
      if not isinstance(obj, tuple(BASE_CLASS_LIST)):
          raise TypeError(
              "obj must be instance of an sktime base class, or a base class"
          )
  
      for i in range(len(BASE_CLASS_SCITYPE_LIST)):
          if isinstance(obj, BASE_CLASS_LIST[i]):
              return BASE_CLASS_SCITYPE_LIST[i]
  
file_path: sktime/sktime/utils/_testing/scenarios_getter.py
imports: from inspect import isclass
  from sktime.base import BaseObject
  from sktime.registry import BASE_CLASS_LIST, BASE_CLASS_SCITYPE_LIST, scitype
  from sktime.utils._testing.scenarios_aligners import scenarios_aligners
  from sktime.utils._testing.scenarios_classification import scenarios_classification, scenarios_early_classification, scenarios_regression
  from sktime.utils._testing.scenarios_clustering import scenarios_clustering
  from sktime.utils._testing.scenarios_forecasting import scenarios_forecasting
  from sktime.utils._testing.scenarios_param_est import scenarios_param_est
  from sktime.utils._testing.scenarios_transformers import scenarios_transformers
  from sktime.utils._testing.scenarios_transformers_pairwise import scenarios_transformers_pairwise, scenarios_transformers_pairwise_panel
label_desc: Use image node_id 2 for calling a global function with example usage: _scitype_from_class(obj) and returns: BASE_CLASS_SCITYPE_LIST