code: def test_value_smoothing(df_enc):
      encoder = MeanEncoder(smoothing=100)
      encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
      X = encoder.transform(df_enc[["var_A", "var_B"]])
  
      # expected output
      transf_df = df_enc.copy()
      var_A_dict = {
          "A": 0.3018867924528302,
          "B": 0.2909090909090909,
          "C": 0.30769230769230765,
      }
      var_B_dict = {
          "A": 0.2909090909090909,
          "B": 0.3018867924528302,
          "C": 0.30769230769230765,
      }
      transf_df["var_A"] = transf_df["var_A"].map(var_A_dict)
      transf_df["var_B"] = transf_df["var_B"].map(var_B_dict)
  
      # test init params
      assert encoder.variables is None
      # test fit attr
      assert encoder.variables_ == ["var_A", "var_B"]
      assert encoder.encoder_dict_ == {
          "var_A": var_A_dict,
          "var_B": var_B_dict,
      }
      assert encoder.n_features_in_ == 2
      # test transform output
      pd.testing.assert_frame_equal(X, transf_df[["var_A", "var_B"]])
  
file_path: feature_engine/tests/test_encoding/test_mean_encoder.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.encoding import MeanEncoder
label_desc: Use image node_id 10 for calling a global function with example usage: test_value_smoothing(df_enc) without return types