code: def rank2d(
      X,
      y=None,
      ax=None,
      algorithm="pearson",
      features=None,
      colormap="RdBu_r",
      show_feature_names=True,
      show=True,
      **kwargs,
  ):
      """Rank2D quick method
  
      Rank2D performs pairwise comparisons of each feature in the data set with
      a specific metric or algorithm (e.g. Pearson correlation) then returns
      them ranked as a lower left triangle diagram.
  
      Parameters
      ----------
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features to perform the pairwise compairsons on.
  
      y : ndarray or Series of length n, default: None
          An array or series of target or class values, optional (not used).
  
      ax : matplotlib Axes, default: None
          The axis to plot the figure on. If None is passed in the current axes
          will be used (or generated if required).
  
      algorithm : str, default: 'pearson'
          The ranking algorithm to use, one of: 'pearson', 'covariance', 'spearman',
          or 'kendalltau'.
  
      features : list
          A list of feature names to use.
          If a DataFrame is passed to fit and features is None, feature names are
          selected as the columns of the DataFrame.
  
      colormap : string or cmap, default: 'RdBu_r'
          optional string or matplotlib cmap to colorize lines
          Use either color to colorize the lines on a per class basis or colormap to
          color them on a continuous scale.
  
      show_feature_names : boolean, default: True
          If True, the feature names are used to label the axis ticks in the plot.
  
      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
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      viz : Rank2D
          Returns the fitted, finalized visualizer that created the Rank2D heatmap.
      """
      # Instantiate the visualizer
      viz = Rank2D(
          ax=ax,
          algorithm=algorithm,
          features=features,
          colormap=colormap,
          show_feature_names=show_feature_names,
          **kwargs,
      )
  
      # Fit and transform the visualizer (calls draw)
      viz.fit(X, y)
      viz.transform(X)
  
      # Show or finalize
      if show:
          viz.show()
      else:
          viz.finalize()
  
      # Return the visualizer object
      return viz
  
imports: import warnings
  import numpy
  import matplotlib
  from scipy.stats import shapiro
  from scipy.stats import spearmanr
  from scipy.stats import kendalltau
  from yellowbrick.utils import is_dataframe
  from yellowbrick.features.base import MultiFeatureVisualizer
  from yellowbrick.exceptions import YellowbrickValueError, YellowbrickWarning
label_desc: Use image node_id 3 for calling a global function with example usage: rank2d(X, y, ax, algorithm, features, colormap, show_feature_names, show) and returns: viz