code: def test_transform_method(df_vartypes):
      transformer = MockClass()
      transformer.fit(df_vartypes)
      Xt = transformer.transform(df_vartypes)
  
      # tests output of transform
      assert_frame_equal(
          Xt, df_vartypes.drop(["Name", "Marks"], axis=1)
      )
  
      # tests this line: X = X[self.feature_names_in_]
      assert_frame_equal(
          transformer.transform(
              df_vartypes[["City", "Age", "Name", "Marks", "dob"]]
          ),
          Xt,
      )
      # test error when there is a df shape missmatch
      with pytest.raises(ValueError):
          assert transformer.transform(df_vartypes[["Age", "Marks"]])
  
file_path: feature_engine/tests/test_selection/test_base_selector.py
imports: import pytest
  from pandas.testing import assert_frame_equal
  from feature_engine.selection.base_selector import BaseSelector
label_desc: Use image node_id 2 for calling a global function with example usage: test_transform_method(df_vartypes) without return types