code: def test_create_train_X_y_MissingValuesExogWarning_when_exog_has_missing_values():
      """
      Test create_train_X_y is issues a MissingValuesExogWarning when exog has missing values.
      """
      y = pd.Series(np.arange(10))
      exog = pd.Series([1, 2, 3, np.nan, 5] * 2, name="exog")
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
  
      warn_msg = re.escape(
          (
              "`exog` has missing values. Most machine learning models do "
              "not allow missing values. Fitting the forecaster may fail."
          )
      )
      with pytest.warns(MissingValuesExogWarning, match=warn_msg):
          forecaster.create_train_X_y(y=y, exog=exog)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  from skforecast.preprocessing import TimeSeriesDifferentiator
  from skforecast.exceptions import MissingValuesExogWarning
  from sklearn.linear_model import LinearRegression
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from .fixtures_ForecasterAutoregCustom import data
label_desc: Use image node_id 3 for calling a global function with example usage: test_create_train_X_y_MissingValuesExogWarning_when_exog_has_missing_values() without return types