code: def test_freq_df(apply_space, n_gram, top_n):
      stop_words = []
      verbose = False
      df = apply_space
      word_frequency = generate_freq_df(
          df,
          n_gram=n_gram,
          top_n=top_n,
          stopwords=stop_words,
          verbose=verbose,
      )
      expect_columns = ["word", "word_count"]
      assert isinstance(word_frequency, pd.DataFrame)
      assert word_frequency.ndim == 2
      assert len(word_frequency) <= top_n
      assert list(word_frequency.columns) == expect_columns
  
file_path: nlplot/tests/test_nlplot.py
imports: import pandas
  import pytest
  from nlplot import NLPlot, get_colorpalette, generate_freq_df
label_desc: Use image node_id 5 for calling a global function with example usage: test_freq_df(apply_space, n_gram, top_n) without return types