code: def test_fit_method(df_vartypes, df_na):
      transformer = MockClass()
      res = transformer.fit(df_vartypes)
      assert transformer.feature_names_in_ == list(df_vartypes.columns)
      assert transformer.n_features_in_ == len(df_vartypes.columns)
      assert_frame_equal(res, df_vartypes)
  
      with pytest.raises(ValueError):
          transformer.fit(df_na)
  
      df_na = df_na.fillna(inf)
      with pytest.raises(ValueError):
          assert transformer.fit(df_na)
  
file_path: feature_engine/tests/test_base_transformers/test_base_numerical_transformer.py
imports: import pytest
  from numpy import inf
  from pandas.testing import assert_frame_equal
  from feature_engine._base_transformers.base_numerical import BaseNumericalTransformer
  from tests.estimator_checks.non_fitted_error_checks import check_raises_non_fitted_error
label_desc: Use image node_id 1 for calling a global function with example usage: test_fit_method(df_vartypes, df_na) without return types