code: def tagcloud(
      worddict, n=10, minsize=25, maxsize=50, minalpha=0.5, maxalpha=1.0
  ):
      import random
  
      from matplotlib import pyplot as plt
  
      worddict = wordfreq_to_weightsize(
          worddict, minsize, maxsize, minalpha, maxalpha
      )
  
      fig = plt.figure()
      ax = fig.add_subplot(111)
      ax.set_position([0.0, 0.0, 1.0, 1.0])
      plt.xticks([])
      plt.yticks([])
  
      words = worddict.keys()
      alphas = [v[0] for v in worddict.values()]
      sizes = [v[1] for v in worddict.values()]
      items = zip(alphas, sizes, words)
      items.sort(reverse=True)
      for alpha, size, word in items[:n]:
          # xpos = random.normalvariate(0.5, 0.3)
          # ypos = random.normalvariate(0.5, 0.3)
          xpos = random.uniform(0.0, 1.0)
          ypos = random.uniform(0.0, 1.0)
          ax.text(xpos, ypos, word.lower(), alpha=alpha, fontsize=size)
      ax.autoscale_view()
      return ax
  
label_desc: Use image node_id 4 for calling a global function with example usage: tagcloud(worddict, n, minsize, maxsize, minalpha, maxalpha) and returns: ax