docstr: Inner method that calls a `sktime.BaseForecaster`.
  
  :param offset: indicates relative offset to the latest data point seen during model training. Cannot be less than the number of training data points + the amount of diffences applied internally by the model.
docstr_tok: ["Inner","method","that","calls","a","`","sktime.BaseForecaster","`",".",":","param","offset",":","indicates","relative","offset","to","the","latest","data","point","seen","during","model","training",".","Can","not","be","less","than","the","number","of","training","data","points","+","the","amount","of","diffences","applied","internally","by","the","model","."]
code: def _call_groupmodel(
      self,
      ydf: pd.DataFrame,
      model: BaseForecaster,
      series: pd.Series,
      offset: int = 0,
  ):
      """
      Inner method that calls a `sktime.BaseForecaster`.
  
      :param offset: indicates relative offset to the latest data point seen during model training. Cannot be less than the number of training data points + the amount of diffences applied internally by the model.
      """  # noqa
      if isinstance(model, TransformedTargetForecaster):
          submodel = model.steps_[-1][-1]
      else:
          submodel = model
  
      min_offset = -len(submodel._y) + 1
      if hasattr(submodel, "d"):
          model_d = 0 if submodel.d is None else submodel.d
          min_offset += model_d
  
      start = max(offset, min_offset)
      end = start + series.shape[0] + self.horizon
  
      # Workaround for StatsForecastAutoARIMA (see sktime#3600)
      if isinstance(submodel, AutoARIMA):
          all_preds = model.predict(
              np.arange(min_offset, end)
          ).tolist()[-(end - start) :]
      else:
          all_preds = model.predict(np.arange(start, end)).tolist()
  
      for true_idx, (idx, _) in enumerate(series.items()):
          start_idx = max(0, true_idx)
          end_idx = start_idx + self.horizon
          ydf["prediction"].loc[idx] = all_preds[start_idx:end_idx]
      return ydf
  
imports: import importlib
  from copy import deepcopy
  from datetime import datetime
  from typing import Dict, Union, Optional
  import optuna
  import numpy
  import pandas
  from sktime.forecasting.compose import TransformedTargetForecaster
  from sktime.forecasting.base import ForecastingHorizon, BaseForecaster
  from sktime.performance_metrics.forecasting import MeanAbsolutePercentageError
  from sktime.forecasting.statsforecast import StatsForecastAutoARIMA
  from lightwood.helpers.log import log
  from lightwood.helpers.templating import _add_cls_kwarg
  from lightwood.mixer.base import BaseMixer
  from lightwood.api.types import PredictionArguments
  from lightwood.data.encoded_ds import EncodedDs, ConcatedEncodedDs
label_desc: Use image node_id 6 for calling the SkTime obj's underlying member method code with example usage: obj._call_groupmodel(ydf, model, series, offset) and returns: ydf