code: def test_inverse_transform_when_encode_unseen():
      df1 = pd.DataFrame(
          {"words": ["dog", "dog", "cat", "cat", "cat", "bird"]}
      )
      df2 = pd.DataFrame(
          {"words": ["dog", "dog", "cat", "cat", "cat", "frog"]}
      )
      df3 = pd.DataFrame(
          {"words": ["dog", "dog", "cat", "cat", "cat", np.nan]}
      )
      enc = CountFrequencyEncoder(unseen="encode")
      enc.fit(df1)
      dft = enc.transform(df2)
      pd.testing.assert_frame_equal(enc.inverse_transform(dft), df3)
  
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 18 for calling a global function with example usage: test_inverse_transform_when_encode_unseen() without return types