code: def test_output_get_feature_importances_when_regressor_is_RandomForestRegressor_lags_3_step_2_exog_included():
      """
      Test output of get_feature_importances for step 2, when regressor is
      RandomForestRegressor with lags=3 and exog.
      """
      forecaster = ForecasterAutoregMultiVariate(
          regressor=RandomForestRegressor(random_state=123),
          level="l2",
          lags=3,
          steps=2,
      )
      forecaster.fit(series=series, exog=exog)
  
      results = forecaster.get_feature_importances(step=2)
      expected = pd.DataFrame(
          {
              "feature": [
                  "l1_lag_1",
                  "l1_lag_2",
                  "l1_lag_3",
                  "l2_lag_1",
                  "l2_lag_2",
                  "l2_lag_3",
                  "exog_1",
                  "exog_2",
              ],
              "importance": np.array(
                  [
                      0.08793949,
                      0.11408644,
                      0.16284783,
                      0.15234993,
                      0.12713124,
                      0.08502362,
                      0.16050297,
                      0.11011847,
                  ]
              ),
          }
      ).sort_values(by="importance", ascending=False)
  
      pd.testing.assert_frame_equal(results, expected)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from sklearn.exceptions import NotFittedError
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.linear_model import LinearRegression
  from sklearn.neural_network import MLPRegressor
  from sklearn.ensemble import RandomForestRegressor
label_desc: Use image node_id 5 for calling a global function with example usage: test_output_get_feature_importances_when_regressor_is_RandomForestRegressor_lags_3_step_2_exog_included() without return types