code: def test_TypeError_is_raised_when_step_is_not_int():
      """
      Test TypeError is raised when calling get_feature_importances() and step is
      not an int.
      """
      forecaster = ForecasterAutoregDirect(
          regressor=RandomForestRegressor(random_state=123),
          lags=3,
          steps=1,
      )
      forecaster.fit(y=pd.Series(np.arange(5)))
  
      step = "not_an_int"
  
      err_msg = re.escape(
          f"`step` must be an integer. Got {type(step)}."
      )
      with pytest.raises(TypeError, 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 1 for calling a global function with example usage: test_TypeError_is_raised_when_step_is_not_int() without return types