code: def rank1d(
      X,
      y=None,
      ax=None,
      algorithm="shapiro",
      features=None,
      orient="h",
      show_feature_names=True,
      color=None,
      show=True,
      **kwargs,
  ):
      """Scores each feature with the algorithm and ranks them in a bar plot.
  
      This helper function is a quick wrapper to utilize the Rank1D Visualizer
      (Transformer) for one-off analysis.
  
      Parameters
      ----------
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features
  
      y : ndarray or Series of length n
          An array or series of target or class values
  
      ax : matplotlib axes
          the axis to plot the figure on.
  
      algorithm : one of {'shapiro', }, default: 'shapiro'
          The ranking algorithm to use, default is 'Shapiro-Wilk.
  
      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.
  
      orient : 'h' or 'v'
          Specifies a horizontal or vertical bar chart.
  
      show_feature_names : boolean, default: True
          If True, the feature names are used to label the axis ticks in the
          plot.
  
      color: string
          Specify color for barchart
  
      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 : Rank1D
          Returns the fitted, finalized visualizer.
  
      """
      # Instantiate the visualizer
      visualizer = Rank1D(
          ax=ax,
          algorithm=algorithm,
          features=features,
          orient=orient,
          show_feature_names=show_feature_names,
          color=color,
          **kwargs,
      )
  
      # Fit and transform the visualizer (calls draw)
      visualizer.fit(X, y)
      visualizer.transform(X)
  
      if show:
          visualizer.show()
      else:
          visualizer.finalize()
  
      # Return the visualizer object
      return visualizer
  
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 2 for calling a global function with example usage: rank1d(X, y, ax, algorithm, features, orient, show_feature_names, color, show) and returns: visualizer