code: def test_test_selector_with_one_variable():
      X, y = df_regression()
  
      sel = SelectByTargetMeanPerformance(
          variables=["cat_var_A"],
          bins=2,
          scoring="neg_root_mean_squared_error",
          regression=True,
          cv=2,
          strategy="equal_width",
          threshold=-0.2,
      )
  
      sel.fit(X, y)
  
      # expected result
      performance_dict = {"cat_var_A": 0.0}
  
      assert sel.features_to_drop_ == []
      assert sel.feature_performance_ == performance_dict
      pd.testing.assert_frame_equal(sel.transform(X), X)
  
      X, y = df_regression()
  
      sel = SelectByTargetMeanPerformance(
          variables=["cat_var_B"],
          bins=2,
          scoring="neg_root_mean_squared_error",
          regression=True,
          cv=2,
          strategy="equal_width",
          threshold=-0.2,
      )
  
      sel.fit(X, y)
  
      # expected result
      Xtransformed = X.drop(columns=["cat_var_B"])
      performance_dict = {"cat_var_B": -0.42817441928883765}
  
      assert sel.features_to_drop_ == ["cat_var_B"]
      assert sel.feature_performance_ == performance_dict
      pd.testing.assert_frame_equal(sel.transform(X), Xtransformed)
  
file_path: feature_engine/tests/test_selection/test_target_mean_selection.py
imports: import pandas
  import pytest
  from feature_engine.selection import SelectByTargetMeanPerformance
label_desc: Use image node_id 7 for calling a global function with example usage: test_test_selector_with_one_variable() without return types