code: def test_transform_method(df_vartypes, df_na):
      transformer = MockClass()
      transformer.fit(df_vartypes)
      assert_frame_equal(
          transformer.transform(df_vartypes), df_vartypes
      )
      assert_frame_equal(
          transformer.transform(
              df_vartypes[["City", "Age", "Name", "Marks", "dob"]]
          ),
          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)
  
      with pytest.raises(ValueError):
          assert transformer.transform(df_vartypes[["Age", "Marks"]])
  
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 2 for calling a global function with example usage: test_transform_method(df_vartypes, df_na) without return types