code: def test_transform_raises_error_if_df_contains_na(
      df_enc_big, df_enc_big_na
  ):
      # test case 5: when dataset contains na, transform method
      with pytest.raises(ValueError):
          encoder = RareLabelEncoder(n_categories=4)
          encoder.fit(df_enc_big)
          encoder.transform(df_enc_big_na)
  
file_path: feature_engine/tests/test_encoding/test_rare_label_encoder.py
imports: import pandas
  import pytest
  from feature_engine.encoding import RareLabelEncoder
label_desc: Use image node_id 7 for calling a global function with example usage: test_transform_raises_error_if_df_contains_na(df_enc_big, df_enc_big_na) without return types