code: def test_exception_is_raised_when_step_is_greater_than_forecaster_steps(
      step,
  ):
      """
      Test exception is raised when calling get_feature_importances() and step is
      less than 1 or greater than the forecaster.steps.
      """
      forecaster = ForecasterAutoregDirect(
          regressor=RandomForestRegressor(random_state=123),
          lags=3,
          steps=1,
      )
      forecaster.fit(y=pd.Series(np.arange(5)))
  
      err_msg = re.escape(
          (
              f"The step must have a value from 1 to the maximum number of steps "
              f"({forecaster.steps}). Got {step}."
          )
      )
      with pytest.raises(ValueError, match=err_msg):
          forecaster.get_feature_importances(step=step)
  
imports: import re
  import pytest
  from pytest import approx
  import numpy
  import pandas
  from skforecast.ForecasterAutoregDirect import ForecasterAutoregDirect
  from sklearn.exceptions import NotFittedError
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.neural_network import MLPRegressor
  from sklearn.ensemble import RandomForestRegressor
label_desc: Use image node_id 3 for calling a global function with example usage: test_exception_is_raised_when_step_is_greater_than_forecaster_steps(step) without return types