code: def __init__(
      self,
      forecaster,
      cv,
      strategy="refit",
      n_jobs=None,
      pre_dispatch=None,
      backend="loky",
      refit=False,
      scoring=None,
      verbose=0,
      return_n_best_forecasters=1,
      update_behaviour="full_refit",
      error_score=np.nan,
      tune_by_instance=False,
      tune_by_variable=False,
      backend_params=None,
  ):
      self.forecaster = forecaster
      self.cv = cv
      self.strategy = strategy
      self.n_jobs = n_jobs
      self.pre_dispatch = pre_dispatch
      self.backend = backend
      self.refit = refit
      self.scoring = scoring
      self.verbose = verbose
      self.return_n_best_forecasters = return_n_best_forecasters
      self.update_behaviour = update_behaviour
      self.error_score = error_score
      self.tune_by_instance = tune_by_instance
      self.tune_by_variable = tune_by_variable
      self.backend_params = backend_params
  
      super().__init__()
  
      tags_to_clone = [
          "requires-fh-in-fit",
          "capability:pred_int",
          "capability:pred_int:insample",
          "capability:insample",
          "ignores-exogeneous-X",
          "handles-missing-data",
          "y_inner_mtype",
          "X_inner_mtype",
          "X-y-must-have-same-index",
          "enforce_index_type",
      ]
      self.clone_tags(forecaster, tags_to_clone)
      self._extend_to_all_scitypes("y_inner_mtype")
      self._extend_to_all_scitypes("X_inner_mtype")
  
      # this ensures univariate broadcasting over variables
      # if tune_by_variable is True
      if tune_by_variable:
          self.set_tags(**{"scitype:y": "univariate"})
  
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 1 to create a new BaseGridSearch object from inherited base classes: _DelegatedForecaster with example: obj = BaseGridSearch(forecaster, cv, strategy, n_jobs, pre_dispatch, backend, refit, scoring, verbose, return_n_best_forecasters, update_behaviour, error_score, tune_by_instance, tune_by_variable, backend_params)