code: def check_exog_dtypes(exog: Union[pd.DataFrame, pd.Series]) -> None:
      """
      Raise Exception if `exog` has categorical columns with non integer values.
      This is needed when using machine learning regressors that allow categorical
      features.
      Issue a Warning if `exog` has columns that are not `init`, `float`, or `category`.
  
      Parameters
      ----------
      exog : pandas DataFrame, pandas Series
          Exogenous variable/s included as predictor/s.
  
      Returns
      -------
      None
  
      """
  
      check_exog(exog=exog, allow_nan=False)
  
      if isinstance(exog, pd.DataFrame):
          if not exog.select_dtypes(
              exclude=[np.number, "category"]
          ).columns.empty:
              warnings.warn(
                  (
                      "`exog` may contain only `int`, `float` or `category` dtypes. Most "
                      "machine learning models do not allow other types of values. "
                      "Fitting the forecaster may fail."
                  ),
                  DataTypeWarning,
              )
          for col in exog.select_dtypes(include="category"):
              if exog[col].cat.categories.dtype not in [
                  int,
                  np.int32,
                  np.int64,
              ]:
                  raise TypeError(
                      (
                          "Categorical columns in exog must contain only integer values. "
                          "See skforecast docs for more info about how to include "
                          "categorical features https://skforecast.org/"
                          "latest/user_guides/categorical-features.html"
                      )
                  )
      else:
          if exog.dtype.name not in [
              "int",
              "int8",
              "int16",
              "int32",
              "int64",
              "float",
              "float16",
              "float32",
              "float64",
              "uint8",
              "uint16",
              "uint32",
              "uint64",
              "category",
          ]:
              warnings.warn(
                  (
                      "`exog` may contain only `int`, `float` or `category` dtypes. Most "
                      "machine learning models do not allow other types of values. "
                      "Fitting the forecaster may fail."
                  ),
                  DataTypeWarning,
              )
          if (
              exog.dtype.name == "category"
              and exog.cat.categories.dtype
              not in [int, np.int32, np.int64]
          ):
              raise TypeError(
                  (
                      "If exog is of type category, it must contain only integer values. "
                      "See skforecast docs for more info about how to include "
                      "categorical features https://skforecast.org/"
                      "latest/user_guides/categorical-features.html"
                  )
              )
  
      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 8 for calling a global function with example usage: check_exog_dtypes(exog) without return types