code: def test_encoders_when_x_pandas_y_numpy(
      encoder, df_test, df_expected
  ):
      """
      Created 2022-03-27 to test fix to issue # 376
      Code adapted from:
      https://github.com/scikit-learn-contrib/category_encoders/issues/280
      """
  
      X = df_test[["x"]]
      y = df_test["y"]
  
      # Test issue fix where X becomes array,
      # y remains Series with original DataFrame index
      y_2 = y.to_numpy()
      df_result = encoder.fit_transform(X, y_2)
      assert df_result.equals(df_expected)
  
file_path: feature_engine/tests/test_encoding/test_check_estimator_encoders.py
imports: import pandas
  import pytest
  from sklearn.utils.estimator_checks import check_estimator
  from feature_engine.encoding import CountFrequencyEncoder, DecisionTreeEncoder, MeanEncoder, OneHotEncoder, OrdinalEncoder, PRatioEncoder, RareLabelEncoder, WoEEncoder, StringSimilarityEncoder
  from tests.estimator_checks.estimator_checks import check_feature_engine_estimator
label_desc: Use image node_id 4 for calling a global function with example usage: test_encoders_when_x_pandas_y_numpy(encoder, df_test, df_expected) without return types