class_docstr: Generic test scenario for transformers.
docstr: Return args for key. Can be overridden for dynamic arg generation.
  
  If overridden, must not have any side effects on self.args
      e.g., avoid assignments args[key] = x without deepcopying self.args first
  
  Parameters
  ----------
  key : str, argument key to construct/retrieve args for
  obj : obj, optional, default=None. Object to construct args for.
  deepcopy_args : bool, optional, default=True. Whether to deepcopy return.
  
  Returns
  -------
  args : argument dict to be used for a method, keyed by `key`
      names for keys need not equal names of methods these are used in
          but scripted method will look at key with same name as default
code: def get_args(self, key, obj=None, deepcopy_args=False):
      """Return args for key. Can be overridden for dynamic arg generation.
  
      If overridden, must not have any side effects on self.args
          e.g., avoid assignments args[key] = x without deepcopying self.args first
  
      Parameters
      ----------
      key : str, argument key to construct/retrieve args for
      obj : obj, optional, default=None. Object to construct args for.
      deepcopy_args : bool, optional, default=True. Whether to deepcopy return.
  
      Returns
      -------
      args : argument dict to be used for a method, keyed by `key`
          names for keys need not equal names of methods these are used in
              but scripted method will look at key with same name as default
      """
      if key == "inverse_transform":
          if obj is None:
              raise ValueError(
                  'if key="inverse_transform", obj must be provided'
              )
  
          X_scitype = self.get_tag("X_scitype")
  
          X_out_scitype = get_tag(obj, "scitype:transform-output")
          X_panel = get_tag(obj, "scitype:instancewise")
  
          X_out_series = X_out_scitype == "Series"
          X_out_prim = X_out_scitype == "Primitives"
  
          # determine output by X_out_scitype
          #   until transformer refactor is complete, use the old classes, too
          if _is_child_of(obj, OLD_MIXINS):
              p2p = _is_child_of(obj, _PanelToPanelTransformer)
          else:
              s2s = X_scitype == "Series" and X_out_series
              s2p = X_scitype == "Series" and X_out_prim
              p2t = X_scitype == "Panel" and X_out_prim
              p2p = X_scitype == "Panel" and X_out_series
  
          # expected input type of inverse_transform is expected output of transform
          if s2p:
              args = {"X": _make_primitives(random_state=RAND_SEED)}
          elif s2s:
              args = {
                  "X": _make_series(
                      n_timepoints=N_T, random_state=RAND_SEED
                  )
              }
          elif p2t:
              args = {
                  "X": _make_tabular_X(
                      n_instances=7, random_state=RAND_SEED
                  )
              }
          elif p2p:
              args = {
                  "X": _make_panel_X(
                      n_instances=7,
                      n_timepoints=N_T,
                      random_state=RAND_SEED,
                  )
              }
          else:
              raise RuntimeError(
                  "transformer with unexpected combination of tags: "
                  f"X_out_scitype = {X_out_scitype}, scitype:instancewise = {X_panel}"
              )
  
      else:
          # default behaviour, happens except when key = "inverse_transform"
          args = self.args.get(key, {})
  
      if deepcopy_args:
          args = deepcopy(args)
  
      return args
  
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 2 for calling the TransformerTestScenario obj's underlying member method code with example usage: obj.get_args(key, obj, deepcopy_args) and returns: args