code: def test_backtesting_forecaster_ValueError_when_ForecasterAutoregDirect_not_enough_steps():
      """
      Test ValueError is raised in backtesting_forecaster when there is not enough
      steps to predict steps+gap in a ForecasterAutoregDirect.
      """
      forecaster = ForecasterAutoregDirect(
          regressor=Ridge(random_state=123), lags=5, steps=5
      )
  
      gap = 5
      steps = 1
  
      err_msg = re.escape(
          (
              "When using a ForecasterAutoregDirect, the combination of steps "
              f"+ gap ({steps+gap}) cannot be greater than the `steps` parameter "
              f"declared when the forecaster is initialized ({forecaster.steps})."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          backtesting_forecaster(
              forecaster=forecaster,
              y=y,
              steps=steps,
              metric="mean_absolute_error",
              initial_train_size=len(y[:-12]),
              fixed_train_size=False,
              gap=gap,
              allow_incomplete_fold=False,
              exog=None,
              refit=False,
              interval=None,
              n_boot=500,
              random_state=123,
              in_sample_residuals=True,
              verbose=False,
              show_progress=False,
          )
  
file_path: skforecast/skforecast/model_selection/tests/test_backtesting_forecaster.py
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.linear_model import Ridge
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.ForecasterAutoregDirect import ForecasterAutoregDirect
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from skforecast.model_selection import backtesting_forecaster
  from .fixtures_model_selection import y
  from .fixtures_model_selection import exog
label_desc: Use image node_id 2 for calling a global function with example usage: test_backtesting_forecaster_ValueError_when_ForecasterAutoregDirect_not_enough_steps() without return types