code: def test_encoding_new_categories(df_enc):
      df_unseen = pd.DataFrame({"var_A": ["D"], "var_B": ["D"]})
      encoder = MeanEncoder(unseen="encode")
      encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
      df_transformed = encoder.transform(df_unseen)
      assert (df_transformed == df_enc["target"].mean()).all(axis=None)
  
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 12 for calling a global function with example usage: test_encoding_new_categories(df_enc) without return types