code: def umap(
      X,
      y=None,
      ax=None,
      classes=None,
      colors=None,
      colormap=None,
      alpha=0.7,
      show=True,
      **kwargs,
  ):
      """
      Display a projection of a vectorized corpus in two dimensions using UMAP (Uniform
      Manifold Approximation and Projection), a nonlinear dimensionality reduction method
      that is particularly well suited to embedding in two or three dimensions for
      visualization as a scatter plot. UMAP is a relatively new technique but is often
      used to visualize clusters or groups of data points and their relative proximities.
      It typically is fast, scalable, and can be applied directly to sparse matrices
      eliminating the need to run a ``TruncatedSVD`` as a pre-processing step.
  
      The current default for UMAP is Euclidean distance. Hellinger distance would be a
      more appropriate distance function to use with CountVectorize data. That will be
      released in a forthcoming version of UMAP. In the meantime cosine distance is likely
      a better text default that Euclidean and can be set using the keyword argument
      ``metric='cosine'``.
  
      Parameters
      ----------
  
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features representing the corpus of
          vectorized documents to visualize with umap.
  
      y : ndarray or Series of length n
          An optional array or series of target or class values for instances.
          If this is specified, then the points will be colored according to
          their class. Often cluster labels are passed in to color the documents
          in cluster space, so this method is used both for classification and
          clustering methods.
  
      ax : matplotlib axes
          The axes to plot the figure on.
  
      classes : list of strings
          The names of the classes in the target, used to create a legend.
  
      colors : list or tuple of colors
          Specify the colors for each individual class
  
      colormap : string or matplotlib cmap
          Sequential colormap for continuous target
  
      alpha : float, default: 0.7
          Specify a transparency where 1 is completely opaque and 0 is completely
          transparent. This property makes densely clustered points more visible.
  
      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()``
  
      kwargs : dict
          Pass any additional keyword arguments to the UMAP transformer.
  
      -------
      visualizer: UMAPVisualizer
          Returns the fitted, finalized visualizer
      """
      # Instantiate the visualizer
      visualizer = UMAPVisualizer(
          ax=ax,
          classes=classes,
          colors=colors,
          colormap=colormap,
          alpha=alpha,
          **kwargs,
      )
  
      # Fit the visualizer (calls draw)
      visualizer.fit(X, y, **kwargs)
  
      if show:
          visualizer.show()
      else:
          visualizer.finalize()
  
      # Return the visualizer object
      return visualizer
  
file_path: yellowbrick/yellowbrick/text/umap_vis.py
imports: import warnings
  import numpy
  from collections import defaultdict
  from yellowbrick.draw import manual_legend
  from yellowbrick.text.base import TextVisualizer
  from yellowbrick.style.colors import resolve_colors
  from yellowbrick.exceptions import YellowbrickValueError
  from sklearn.pipeline import Pipeline
label_desc: Use image node_id 1 for calling a global function with example usage: umap(X, y, ax, classes, colors, colormap, alpha, show) and returns: visualizer