code: def check_predict_input(
      forecaster_name: str,
      steps: Union[int, list],
      fitted: bool,
      included_exog: bool,
      index_type: type,
      index_freq: str,
      window_size: int,
      last_window: Optional[Union[pd.Series, pd.DataFrame]] = None,
      last_window_exog: Optional[Union[pd.Series, pd.DataFrame]] = None,
      exog: Optional[Union[pd.Series, pd.DataFrame]] = None,
      exog_type: Optional[Union[type, None]] = None,
      exog_col_names: Optional[Union[list, None]] = None,
      interval: Optional[list] = None,
      alpha: Optional[float] = None,
      max_steps: Optional[int] = None,
      levels: Optional[Union[str, list]] = None,
      series_col_names: Optional[list] = None,
  ) -> None:
      """
      Check all inputs of predict method. This is a helper function to validate
      that inputs used in predict method match attributes of a forecaster already
      trained.
  
      Parameters
      ----------
      forecaster_name : str
          Forecaster name. ForecasterAutoreg, ForecasterAutoregCustom,
          ForecasterAutoregDirect, ForecasterAutoregMultiSeries,
          ForecasterAutoregMultiSeriesCustom, ForecasterAutoregMultiVariate.
      steps : int, list
          Number of future steps predicted.
      fitted: bool
          Tag to identify if the regressor has been fitted (trained).
      included_exog : bool
          If the forecaster has been trained using exogenous variable/s.
      index_type : type
          Type of index of the input used in training.
      index_freq : str
          Frequency of Index of the input used in training.
      window_size: int
          Size of the window needed to create the predictors. It is equal to
          `max_lag`.
      last_window : pandas Series, pandas DataFrame, default `None`
          Values of the series used to create the predictors (lags) need in the
          first iteration of prediction (t + 1).
      last_window_exog : pandas Series, pandas DataFrame, default `None`
          Values of the exogenous variables aligned with `last_window` in
          ForecasterSarimax predictions.
      exog : pandas Series, pandas DataFrame, default `None`
          Exogenous variable/s included as predictor/s.
      exog_type : type, default `None`
          Type of exogenous variable/s used in training.
      exog_col_names : list, default `None`
          Names of columns of `exog` if `exog` used in training was a pandas
          DataFrame.
      interval : list, default `None`
          Confidence of the prediction interval estimated. Sequence of percentiles
          to compute, which must be between 0 and 100 inclusive. For example,
          interval of 95% should be as `interval = [2.5, 97.5]`.
      alpha : float, default `None`
          The confidence intervals used in ForecasterSarimax are (1 - alpha) %.
      max_steps: int, default `None`
          Maximum number of steps allowed (`ForecasterAutoregDirect` and
          `ForecasterAutoregMultiVariate`).
      levels : str, list, default `None`
          Time series to be predicted (`ForecasterAutoregMultiSeries` and
          `ForecasterAutoregMultiSeriesCustom`).
      series_col_names : list, default `None`
          Names of the columns used during fit (`ForecasterAutoregMultiSeries`,
          `ForecasterAutoregMultiSeriesCustom` and `ForecasterAutoregMultiVariate`).
  
      Returns
      -------
      None
  
      """
  
      if not fitted:
          raise sklearn.exceptions.NotFittedError(
              (
                  "This Forecaster instance is not fitted yet. Call `fit` with "
                  "appropriate arguments before using predict."
              )
          )
  
      if isinstance(steps, (int, np.integer)) and steps < 1:
          raise ValueError(
              f"`steps` must be an integer greater than or equal to 1. Got {steps}."
          )
  
      if isinstance(steps, list) and min(steps) < 1:
          raise ValueError(
              (
                  f"The minimum value of `steps` must be equal to or greater than 1. "
                  f"Got {min(steps)}."
              )
          )
  
      if max_steps is not None:
          if max(steps) > max_steps:
              raise ValueError(
                  (
                      f"The maximum value of `steps` must be less than or equal to "
                      f"the value of steps defined when initializing the forecaster. "
                      f"Got {max(steps)}, but the maximum is {max_steps}."
                  )
              )
  
      if interval is not None or alpha is not None:
          check_interval(interval=interval, alpha=alpha)
  
      if forecaster_name in [
          "ForecasterAutoregMultiSeries",
          "ForecasterAutoregMultiSeriesCustom",
      ]:
          if levels is not None and not isinstance(levels, (str, list)):
              raise TypeError(
                  (
                      "`levels` must be a `list` of column names, a `str` of a "
                      "column name or `None`."
                  )
              )
          if len(set(levels) - set(series_col_names)) != 0:
              raise ValueError(
                  f"`levels` must be in `series_col_names` : {series_col_names}."
              )
  
      if exog is None and included_exog:
          raise ValueError(
              (
                  "Forecaster trained with exogenous variable/s. "
                  "Same variable/s must be provided when predicting."
              )
          )
  
      if exog is not None and not included_exog:
          raise ValueError(
              (
                  "Forecaster trained without exogenous variable/s. "
                  "`exog` must be `None` when predicting."
              )
          )
  
      # Checks last_window
      # Check last_window type (pd.Series or pd.DataFrame according to forecaster)
      if forecaster_name in [
          "ForecasterAutoregMultiSeries",
          "ForecasterAutoregMultiSeriesCustom",
          "ForecasterAutoregMultiVariate",
      ]:
          if not isinstance(last_window, pd.DataFrame):
              raise TypeError(
                  f"`last_window` must be a pandas DataFrame. Got {type(last_window)}."
              )
  
          if (
              forecaster_name
              in [
                  "ForecasterAutoregMultiSeries",
                  "ForecasterAutoregMultiSeriesCustom",
              ]
              and len(set(levels) - set(last_window.columns)) != 0
          ):
              raise ValueError(
                  (
                      f"`last_window` must contain a column(s) named as the level(s) "
                      f"to be predicted.\n"
                      f"    `levels` : {levels}.\n"
                      f"    `last_window` columns : {list(last_window.columns)}."
                  )
              )
  
          if forecaster_name == "ForecasterAutoregMultiVariate" and (
              series_col_names != list(last_window.columns)
          ):
              raise ValueError(
                  (
                      f"`last_window` columns must be the same as `series` column names.\n"
                      f"    `last_window` columns : {list(last_window.columns)}.\n"
                      f"    `series` columns      : {series_col_names}."
                  )
              )
      else:
          if not isinstance(last_window, pd.Series):
              raise TypeError(
                  f"`last_window` must be a pandas Series. Got {type(last_window)}."
              )
  
      # Check last_window len, nulls and index (type and freq)
      if len(last_window) < window_size:
          raise ValueError(
              (
                  f"`last_window` must have as many values as needed to "
                  f"generate the predictors. For this forecaster it is {window_size}."
              )
          )
      if last_window.isnull().any().all():
          raise ValueError(("`last_window` has missing values."))
      _, last_window_index = preprocess_last_window(
          last_window=last_window.iloc[:0], return_values=False
      )
      if not isinstance(last_window_index, index_type):
          raise TypeError(
              (
                  f"Expected index of type {index_type} for `last_window`. "
                  f"Got {type(last_window_index)}."
              )
          )
      if isinstance(last_window_index, pd.DatetimeIndex):
          if not last_window_index.freqstr == index_freq:
              raise TypeError(
                  (
                      f"Expected frequency of type {index_freq} for `last_window`. "
                      f"Got {last_window_index.freqstr}."
                  )
              )
  
      # Checks exog
      if exog is not None:
          # Check type, nulls and expected type
          if not isinstance(exog, (pd.Series, pd.DataFrame)):
              raise TypeError(
                  "`exog` must be a pandas Series or DataFrame."
              )
          if exog.isnull().any().any():
              warnings.warn(
                  (
                      "`exog` has missing values. Most of machine learning models do "
                      "not allow missing values. `predict` method may fail."
                  ),
                  MissingValuesExogWarning,
              )
          if not isinstance(exog, exog_type):
              raise TypeError(
                  f"Expected type for `exog`: {exog_type}. Got {type(exog)}."
              )
  
          # Check exog has many values as distance to max step predicted
          last_step = max(steps) if isinstance(steps, list) else steps
          if len(exog) < last_step:
              raise ValueError(
                  (
                      f"`exog` must have at least as many values as the distance to "
                      f"the maximum step predicted, {last_step}."
                  )
              )
  
          # Check all columns are in the pandas DataFrame
          if isinstance(exog, pd.DataFrame):
              col_missing = set(exog_col_names).difference(
                  set(exog.columns)
              )
              if col_missing:
                  raise ValueError(
                      (
                          f"Missing columns in `exog`. Expected {exog_col_names}. "
                          f"Got {exog.columns.to_list()}."
                      )
                  )
  
          # Check index dtype and freq
          _, exog_index = preprocess_exog(
              exog=exog.iloc[:0,], return_values=False
          )
          if not isinstance(exog_index, index_type):
              raise TypeError(
                  (
                      f"Expected index of type {index_type} for `exog`. "
                      f"Got {type(exog_index)}."
                  )
              )
          if isinstance(exog_index, pd.DatetimeIndex):
              if not exog_index.freqstr == index_freq:
                  raise TypeError(
                      (
                          f"Expected frequency of type {index_freq} for `exog`. "
                          f"Got {exog_index.freqstr}."
                      )
                  )
  
          # Check exog starts one step ahead of last_window end.
          expected_index = expand_index(last_window.index, 1)[0]
          if expected_index != exog.index[0]:
              raise ValueError(
                  (
                      f"To make predictions `exog` must start one step ahead of `last_window`.\n"
                      f"    `last_window` ends at : {last_window.index[-1]}.\n"
                      f"    `exog` starts at      : {exog.index[0]}.\n"
                      f"     Expected index       : {expected_index}."
                  )
              )
  
      # Checks ForecasterSarimax
      if forecaster_name == "ForecasterSarimax":
          # Check last_window_exog type, len, nulls and index (type and freq)
          if last_window_exog is not None:
              if not included_exog:
                  raise ValueError(
                      (
                          "Forecaster trained without exogenous variable/s. "
                          "`last_window_exog` must be `None` when predicting."
                      )
                  )
  
              if not isinstance(
                  last_window_exog, (pd.Series, pd.DataFrame)
              ):
                  raise TypeError(
                      (
                          f"`last_window_exog` must be a pandas Series or a "
                          f"pandas DataFrame. Got {type(last_window_exog)}."
                      )
                  )
              if len(last_window_exog) < window_size:
                  raise ValueError(
                      (
                          f"`last_window_exog` must have as many values as needed to "
                          f"generate the predictors. For this forecaster it is {window_size}."
                      )
                  )
              if last_window_exog.isnull().any().all():
                  warnings.warn(
                      (
                          "`last_window_exog` has missing values. Most of machine learning "
                          "models do not allow missing values. `predict` method may fail."
                      ),
                      MissingValuesExogWarning,
                  )
              _, last_window_exog_index = preprocess_last_window(
                  last_window=last_window_exog.iloc[:0],
                  return_values=False,
              )
              if not isinstance(last_window_exog_index, index_type):
                  raise TypeError(
                      (
                          f"Expected index of type {index_type} for `last_window_exog`. "
                          f"Got {type(last_window_exog_index)}."
                      )
                  )
              if isinstance(last_window_exog_index, pd.DatetimeIndex):
                  if not last_window_exog_index.freqstr == index_freq:
                      raise TypeError(
                          (
                              f"Expected frequency of type {index_freq} for "
                              f"`last_window_exog`. Got {last_window_exog_index.freqstr}."
                          )
                      )
  
              # Check all columns are in the pd.DataFrame, last_window_exog
              if isinstance(last_window_exog, pd.DataFrame):
                  col_missing = set(exog_col_names).difference(
                      set(last_window_exog.columns)
                  )
                  if col_missing:
                      raise ValueError(
                          (
                              f"Missing columns in `exog`. Expected {exog_col_names}. "
                              f"Got {last_window_exog.columns.to_list()}."
                          )
                      )
  
      return
  
imports: from typing import Union, Any, Optional, Tuple, Callable
  import warnings
  import importlib
  import joblib
  import numpy
  import pandas
  import sklearn
  import sklearn.pipeline
  import sklearn.linear_model
  from sklearn.compose import ColumnTransformer
  from sklearn.exceptions import NotFittedError
  import inspect
  from copy import deepcopy
  import skforecast
  from ..exceptions import MissingValuesExogWarning
  from ..exceptions import DataTypeWarning
  from ..exceptions import IgnoredArgumentWarning
  from ..exceptions import SkforecastVersionWarning
label_desc: Use image node_id 10 for calling a global function with example usage: check_predict_input(forecaster_name, steps, fitted, included_exog, index_type, index_freq, window_size, last_window, last_window_exog, exog, exog_type, exog_col_names, interval, alpha, max_steps, levels, series_col_names) without return types