code: def getFrequencyDictForText(sentence):
      fullTermsDict = multidict.MultiDict()
      tmpDict = {}
  
      # making dict for counting frequencies
      for text in sentence.split(" "):
          if re.match(
              "a|the|an|the|to|in|for|of|or|by|with|is|on|that|be", text
          ):
              continue
          val = tmpDict.get(text, 0)
          tmpDict[text.lower()] = val + 1
      for key in tmpDict:
          fullTermsDict.add(key, tmpDict[key])
      return fullTermsDict
  
file_path: word_cloud/examples/frequency.py
imports: import multidict
  import numpy
  import os
  import re
  from PIL import Image
  from os import path
  from wordcloud import WordCloud
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: getFrequencyDictForText(sentence) and returns: fullTermsDict