docstr: Calls the mixer to emit forecasts.
  
  If there are groups that were not observed at training, a default forecaster (trained on all available data) is used, warning the user that performance might not be optimal.
  
  Latest data point in `train_data` passed to `fit()` determines the starting point for predictions. Relative offsets will be automatically determined when predicting for other starting points.
docstr_tok: ["Calls","the","mixer","to","emit","forecasts",".","If","there","are","groups","that","were","not","observed","at","training",",","a","default","forecaster","(","trained","on","all","available","data",")","is","used",",","warning","the","user","that","performance","might","not","be","optimal",".","Latest","data","point","in","`","train_data","`","passed","to","`","fit","(",")","`","determines","the","starting","point","for","predictions",".","Relative","offsets","will","be","automatically","determined","when","predicting","for","other","starting","points","."]
code: def __call__(
      self,
      ds: Union[EncodedDs, ConcatedEncodedDs],
      args: PredictionArguments = PredictionArguments(),
  ) -> pd.DataFrame:
      """
      Calls the mixer to emit forecasts.
  
      If there are groups that were not observed at training, a default forecaster (trained on all available data) is used, warning the user that performance might not be optimal.
  
      Latest data point in `train_data` passed to `fit()` determines the starting point for predictions. Relative offsets will be automatically determined when predicting for other starting points.
      """  # noqa
      if args.predict_proba:
          log.warning(
              "This mixer does not output probability estimates"
          )
  
      df = deepcopy(ds.data_frame)
      df = df.rename_axis("__sktime_index").reset_index()
  
      gby = self.ts_analysis["tss"].group_by
      ydf = pd.DataFrame(
          0,  # zero-filled
          index=df.index,
          columns=["prediction"],
          dtype=object,
      )
  
      pending_idxs = set(df.index)
      grouped = (
          df.groupby(by=gby)
          if gby
          else df.groupby(lambda x: "__default")
      )
      for group, series_data in grouped:
          if series_data.size > 0:
              start_ts = series_data["__sktime_index"].iloc[0]
              series = series_data[self.target]
              series_idxs = series.index
              if (
                  self.models.get(group, False)
                  and self.models[group].is_fitted
              ):
                  freq = self.ts_analysis["deltas"][group]
                  delta = (
                      start_ts - self.cutoffs[group]
                  ).total_seconds()
                  offset = round(delta / freq)
                  forecaster = self.models[group]
                  ydf = self._call_groupmodel(
                      ydf, forecaster, series, offset=offset
                  )
              else:
                  log.warning(
                      f"Applying naive forecaster for novel group {group}. Performance might not be optimal."
                  )
                  ydf = self._call_default(
                      ydf, series.values, series_idxs
                  )
              pending_idxs -= set(series_idxs)
  
      # apply default model in all remaining novel-group rows
      if len(pending_idxs) > 0:
          series = df[self.target][list(pending_idxs)].squeeze()
          ydf = self._call_default(ydf, series, list(pending_idxs))
  
      return ydf[["prediction"]]
  
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 5 for calling the SkTime obj's underlying member method code with example usage: obj.__call__(ds, args) and returns: ydf