code: def test_error_when_imputation_method_not_frequent_or_missing():
      with pytest.raises(ValueError):
          CategoricalImputer(imputation_method="arbitrary")
  
file_path: feature_engine/tests/test_imputation/test_categorical_imputer.py
imports: import pandas
  import pytest
  from feature_engine.imputation import CategoricalImputer
label_desc: Use image node_id 7 for calling a global function with example usage: test_error_when_imputation_method_not_frequent_or_missing() without return types