code: def test_categorical_methods_mixin_transform_raise_unseen():
      input_df = pd.DataFrame({"words": ["dog", "dig", "bird"]})
      enc = MockClass(unseen="raise")
      with pytest.raises(ValueError):
          enc.transform(input_df)
  
file_path: feature_engine/tests/test_encoding/test_base_encoder.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.encoding.base_encoder import CategoricalInitMixin, CategoricalMethodsMixin
label_desc: Use image node_id 4 for calling a global function with example usage: test_categorical_methods_mixin_transform_raise_unseen() without return types