code: def word_correlation(
      words,
      corpus,
      ignore_case=True,
      ax=None,
      cmap="RdYlBu",
      show=True,
      colorbar=True,
      fontsize=None,
      **kwargs,
  ):
      """Word Correlation
  
      Displays the binary correlation between the given words across the documents in a
      corpus.
      For a list of words with length n, this produces an n x n heatmap of correlation
      values in the range [-1, 1].
  
      Parameters
      ----------
  
      words : list of str
          The corpus words to display in the heatmap.
      corpus : list of str or generator
          The corpus as a list of documents or a generator yielding documents.
  
      ignore_case : bool, default: True
          If True, all words will be converted to lowercase before proessing.
  
      ax : matplotlib axes, default: None
          The axes to plot the figure on.
  
      cmap : str, default: "RdYlBu"
          Colormap to use for the heatmap.
  
      show : bool, default: True
          If True, calls ``show()``, which in turn calls ``plt.show()`` however
          you cannot call ``plt.savefig`` from this signature, nor
          ``clear_figure``. If False, simply calls ``finalize()``
  
      colorbar : bool, default: True
          If True, adds a colorbar to the figure.
  
      fontsize : int, default: None
          If not None, sets the font size of the labels.
      """
      # Instantiate the visualizer
      visualizer = WordCorrelationPlot(
          words=words,
          lowercase=ignore_case,
          ax=ax,
          cmap=cmap,
          colorbar=colorbar,
          fontsize=fontsize,
          **kwargs,
      )
  
      # Fit and transform the visualizer (calls draw)
      visualizer.fit(corpus)
  
      # Draw the final visualization
      if show:
          visualizer.show()
      else:
          visualizer.finalize()
  
      # Return the visualizer
      return visualizer
  
file_path: yellowbrick/yellowbrick/text/correlation.py
imports: import numpy
  from sklearn.feature_extraction.text import CountVectorizer
  from yellowbrick.style import find_text_color
  from yellowbrick.text.base import TextVisualizer
  from yellowbrick.style.palettes import color_sequence
  from yellowbrick.exceptions import YellowbrickValueError
label_desc: Use image node_id 1 for calling a global function with example usage: word_correlation(words, corpus, ignore_case, ax, cmap, show, colorbar, fontsize) and returns: visualizer