class_docstr: Generic test scenario for transformers.
docstr: Check whether scenario is applicable to obj.
  
  Parameters
  ----------
  obj : class or object to check against scenario
  
  Returns
  -------
  applicable: bool
      True if self is applicable to obj, False if not
code: def is_applicable(self, obj):
      """Check whether scenario is applicable to obj.
  
      Parameters
      ----------
      obj : class or object to check against scenario
  
      Returns
      -------
      applicable: bool
          True if self is applicable to obj, False if not
      """
      # pre-refactor classes can't deal with Series *and* Panel both
      X_scitype = self.get_tag("X_scitype")
      y_scitype = self.get_tag("y_scitype", None, raise_error=False)
  
      if _is_child_of(obj, OLD_PANEL_MIXINS) and X_scitype != "Panel":
          return False
  
      # if transformer requires y, the scenario also must pass y
      has_y = self.get_tag("has_y")
      if not has_y and get_tag(obj, "requires_y"):
          return False
  
      # the case that we would need to vectorize with y, skip
      X_inner_mtype = get_tag(obj, "X_inner_mtype")
      X_inner_scitypes = mtype_to_scitype(
          X_inner_mtype, return_unique=True, coerce_to_list=True
      )
      # we require vectorization from of a Series trafo to Panel data ...
      if X_scitype == "Panel" and "Panel" not in X_inner_scitypes:
          # ... but y is passed and y is not ignored internally ...
          if (
              self.get_tag("has_y")
              and get_tag(obj, "y_inner_mtype") != "None"
          ):
              # ... this would raise an error since vectorization is not defined
              return False
  
      # ensure scenario y matches type of inner y
      y_inner_mtype = get_tag(obj, "y_inner_mtype")
      if y_inner_mtype not in [None, "None"]:
          y_inner_scitypes = mtype_to_scitype(
              y_inner_mtype, return_unique=True, coerce_to_list=True
          )
          if y_scitype not in y_inner_scitypes:
              return False
  
      # only applicable if X of supported index type
      X = self.args["fit"]["X"]
      supported_idx_types = get_tag(obj, "enforce_index_type")
      if (
          isinstance(X, (pd.Series, pd.DataFrame))
          and supported_idx_types is not None
      ):
          if type(X.index) not in supported_idx_types:
              return False
      if isinstance(X, np.ndarray) and supported_idx_types is not None:
          if pd.RangeIndex not in supported_idx_types:
              return False
  
      return True
  
imports: from copy import deepcopy
  from inspect import isclass
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.datatypes import mtype_to_scitype
  from sktime.transformations.base import _PanelToPanelTransformer
  from sktime.utils._testing.estimator_checks import _make_primitives, _make_tabular_X
  from sktime.utils._testing.forecasting import _make_series
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.panel import _make_classification_y, _make_panel_X
  from sktime.utils._testing.scenarios import TestScenario
label_desc: Use image node_id 1 for calling the TransformerTestScenario obj's underlying member method code with example usage: obj.is_applicable(obj) and returns: True, False, False, False, False, False, False