code: def test_generate_from_frequencies():
      # test that generate_from_frequencies() takes input argument dicts
      wc = WordCloud(max_words=50)
      words = wc.process_text(THIS)
      result = wc.generate_from_frequencies(words)
  
      assert isinstance(result, WordCloud)
  
imports: from wordcloud import WordCloud, get_single_color_func, ImageColorGenerator
  import numpy
  import pytest
  from random import Random
  from numpy.testing import assert_array_equal
  from PIL import Image
  import xml.etree.ElementTree
  import matplotlib
label_desc: Use image node_id 21 for calling a global function with example usage: test_generate_from_frequencies() without return types