docstr: Ensure mtypes for all scitypes are in the tag with tagname.
  
  Mutates self tag with name `tagname`.
  If no mtypes are present of a time series scitype, adds a pandas based one.
  If only univariate pandas scitype is present for Series ("pd.Series"),
  also adds the multivariate one ("pd.DataFrame").
  
  If tune_by_instance is True, only Series mtypes are added,
  and potentially present Panel or Hierarchical mtypes are removed.
  
  Parameters
  ----------
  tagname : str, name of the tag. Should be "y_inner_mtype" or "X_inner_mtype".
  
  Returns
  -------
  None (mutates tag in self)
code: def _extend_to_all_scitypes(self, tagname):
      """Ensure mtypes for all scitypes are in the tag with tagname.
  
      Mutates self tag with name `tagname`.
      If no mtypes are present of a time series scitype, adds a pandas based one.
      If only univariate pandas scitype is present for Series ("pd.Series"),
      also adds the multivariate one ("pd.DataFrame").
  
      If tune_by_instance is True, only Series mtypes are added,
      and potentially present Panel or Hierarchical mtypes are removed.
  
      Parameters
      ----------
      tagname : str, name of the tag. Should be "y_inner_mtype" or "X_inner_mtype".
  
      Returns
      -------
      None (mutates tag in self)
      """
      tagval = self.get_tag(tagname)
      if not isinstance(tagval, list):
          tagval = [tagval]
      scitypes = mtype_to_scitype(tagval, return_unique=True)
      # if no Series mtypes are present, add pd.DataFrame
      if "Series" not in scitypes:
          tagval = tagval + ["pd.DataFrame"]
      # ensure we have a Series mtype capable of multivariate
      elif "pd.Series" in tagval and "pd.DataFrame" not in tagval:
          tagval = ["pd.DataFrame"] + tagval
      # if no Panel mtypes are present, add pd.DataFrame based one
      if "Panel" not in scitypes:
          tagval = tagval + ["pd-multiindex"]
      # if no Hierarchical mtypes are present, add pd.DataFrame based one
      if "Hierarchical" not in scitypes:
          tagval = tagval + ["pd_multiindex_hier"]
  
      if self.tune_by_instance:
          tagval = [
              x for x in tagval if mtype_to_scitype(x) == "Series"
          ]
  
      self.set_tags(**{tagname: tagval})
  
imports: from collections.abc import Sequence
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from sklearn.model_selection import ParameterGrid, ParameterSampler, check_cv
  from sktime.datatypes import mtype_to_scitype
  from sktime.exceptions import NotFittedError
  from sktime.forecasting.base._delegate import _DelegatedForecaster
  from sktime.forecasting.model_evaluation import evaluate
  from sktime.performance_metrics.base import BaseMetric
  from sktime.split.base import BaseSplitter
  from sktime.utils.parallel import parallelize
  from sktime.utils.validation.forecasting import check_scoring
  from sktime.utils.warnings import warn
label_desc: Use image node_id 2 for calling the BaseGridSearch obj's underlying member method code with example usage: obj._extend_to_all_scitypes(tagname) without return types