code: def test_feature_importances(_estimator, _importance, df_test):
      X, y = df_test
  
      sel = RecursiveFeatureAddition(_estimator, threshold=-100).fit(
          X, y
      )
      _importance.sort(reverse=True)
      assert (
          list(np.round(sel.feature_importances_.values, 4))
          == _importance
      )
  
      sel = RecursiveFeatureElimination(_estimator, threshold=-100).fit(
          X, y
      )
      _importance.sort(reverse=False)
      assert (
          list(np.round(sel.feature_importances_.values, 4))
          == _importance
      )
  
file_path: feature_engine/tests/test_selection/test_recursive_feature_selectors.py
imports: import numpy
  import pytest
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import Lasso, LogisticRegression
  from sklearn.model_selection import KFold, StratifiedKFold
  from sklearn.tree import DecisionTreeRegressor
  from feature_engine.selection import RecursiveFeatureAddition, RecursiveFeatureElimination
label_desc: Use image node_id 4 for calling a global function with example usage: test_feature_importances(_estimator, _importance, df_test) without return types