code: def feature_importances(
      estimator,
      X,
      y=None,
      ax=None,
      labels=None,
      relative=True,
      absolute=False,
      xlabel=None,
      stack=False,
      colors=None,
      colormap=None,
      is_fitted="auto",
      topn=None,
      show=True,
      **kwargs,
  ):
      """Quick Method:
      Displays the most informative features in a model by showing a bar chart
      of features ranked by their importances. Although primarily a feature
      engineering mechanism, this visualizer requires a model that has either a
      ``coef_`` or ``feature_importances_`` parameter after fit.
  
      Parameters
      ----------
      estimator : Estimator
          A Scikit-Learn estimator that learns feature importances. Must support
          either ``coef_`` or ``feature_importances_`` parameters. If the estimator
          is not fitted, it is fit when the visualizer is fitted, unless otherwise
          specified by ``is_fitted``.
  
      X : ndarray or DataFrame of shape n x m
          A matrix of n instances with m features
  
      y : ndarray or Series of length n, optional
          An array or series of target or class values
  
      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).
  
      labels : list, default: None
          A list of feature names to use. If a DataFrame is passed to fit and
          features is None, feature names are selected as the column names.
  
      relative : bool, default: True
          If true, the features are described by their relative importance as a
          percentage of the strongest feature component; otherwise the raw
          numeric description of the feature importance is shown.
  
      absolute : bool, default: False
          Make all coeficients absolute to more easily compare negative
          coeficients with positive ones.
  
      xlabel : str, default: None
          The label for the X-axis. If None is automatically determined by the
          underlying model and options provided.
  
      stack : bool, default: False
          If true and the classifier returns multi-class feature importance,
          then a stacked bar plot is plotted; otherwise the mean of the
          feature importance across classes are plotted.
  
      colors: list of strings
          Specify colors for each bar in the chart if ``stack==False``.
  
      colormap : string or matplotlib cmap
          Specify a colormap to color the classes if ``stack==True``.
  
      is_fitted : bool or str, default='auto'
          Specify if the wrapped estimator is already fitted. If False, the estimator
          will be fit when the visualizer is fit, otherwise, the estimator will not be
          modified. If 'auto' (default), a helper method will check if the estimator
          is fitted before fitting it again.
  
      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()``
  
      topn : int, default=None
          Display only the top N results with a positive integer, or the bottom N
          results with a negative integer. If None or 0, all results are shown.
  
      kwargs : dict
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      viz : FeatureImportances
          The feature importances visualizer, fitted and finalized.
      """
      # Instantiate the visualizer
      visualizer = FeatureImportances(
          estimator,
          ax=ax,
          labels=labels,
          relative=relative,
          absolute=absolute,
          xlabel=xlabel,
          stack=stack,
          colors=colors,
          colormap=colormap,
          is_fitted=is_fitted,
          topn=topn,
          **kwargs,
      )
  
      # Fit and transform the visualizer (calls draw)
      visualizer.fit(X, y)
  
      if show:
          visualizer.show()
      else:
          visualizer.finalize()
  
      # Return the visualizer
      return visualizer
  
imports: import warnings
  import numpy
  from yellowbrick.draw import bar_stack
  from yellowbrick.base import ModelVisualizer
  from yellowbrick.style.colors import resolve_colors
  from yellowbrick.utils import is_dataframe, is_classifier
  from yellowbrick.exceptions import YellowbrickTypeError, NotFitted
  from yellowbrick.exceptions import YellowbrickWarning, YellowbrickValueError
label_desc: Use image node_id 1 for calling a global function with example usage: feature_importances(estimator, X, y, ax, labels, relative, absolute, xlabel, stack, colors, colormap, is_fitted, topn, show) and returns: visualizer