code: def test_check_predict_input_ValueError_when_exog_index_does_not_follow_last_window_index_RangeIndex():
      """
      Raise ValueError if `exog` index does not start at the end of `last_window` index when RangeIndex.
      """
      exog_datetime = pd.Series(data=np.random.rand(10))
      exog_datetime.index = pd.RangeIndex(start=11, stop=21)
      lw_datetime = pd.Series(data=np.random.rand(10))
      lw_datetime.index = pd.RangeIndex(start=0, stop=10)
  
      expected_index = 10
  
      err_msg = re.escape(
          (
              f"To make predictions `exog` must start one step ahead of `last_window`.\n"
              f"    `last_window` ends at : {lw_datetime.index[-1]}.\n"
              f"    `exog` starts at      : {exog_datetime.index[0]}.\n"
              f"     Expected index       : {expected_index}."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          check_predict_input(
              forecaster_name="ForecasterAutoreg",
              steps=10,
              fitted=True,
              included_exog=True,
              index_type=pd.RangeIndex,
              index_freq="M",
              window_size=5,
              last_window=lw_datetime,
              last_window_exog=None,
              exog=exog_datetime,
              exog_type=pd.Series,
              exog_col_names=None,
              interval=None,
              alpha=None,
              max_steps=None,
              levels=None,
              series_col_names=None,
          )
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.utils import check_predict_input
  from skforecast.utils import check_exog
  from skforecast.utils import preprocess_exog
  from skforecast.utils import preprocess_last_window
  from skforecast.exceptions import MissingValuesExogWarning
label_desc: Use image node_id 25 for calling a global function with example usage: test_check_predict_input_ValueError_when_exog_index_does_not_follow_last_window_index_RangeIndex() without return types