code: def test_fit_raises_error_if_df_contains_na(errors, df_enc_na):
      # test case 4: when dataset contains na, fit method
      encoder = CountFrequencyEncoder(unseen=errors)
      with pytest.raises(ValueError):
          encoder.fit(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 7 for calling a global function with example usage: test_fit_raises_error_if_df_contains_na(errors, df_enc_na) without return types