code: def test_transform_raises_error_if_df_contains_na(
      errors, df_enc, df_enc_na
  ):
      # test case 4: when dataset contains na, transform method
      encoder = CountFrequencyEncoder(unseen=errors)
      encoder.fit(df_enc)
      with pytest.raises(ValueError):
          encoder.transform(df_enc_na)
  
imports: import warnings
  import numpy
  import pandas
  import pytest
  from numpy import nan
  from feature_engine.encoding import CountFrequencyEncoder
label_desc: Use image node_id 8 for calling a global function with example usage: test_transform_raises_error_if_df_contains_na(errors, df_enc, df_enc_na) without return types