code: def residuals_plot(
      estimator,
      X_train,
      y_train,
      X_test=None,
      y_test=None,
      ax=None,
      hist=True,
      qqplot=False,
      train_color="b",
      test_color="g",
      line_color=LINE_COLOR,
      train_alpha=0.75,
      test_alpha=0.75,
      is_fitted="auto",
      show=True,
      **kwargs,
  ):
      """ResidualsPlot quick method:
  
      A residual plot shows the residuals on the vertical axis and the
      independent variable on the horizontal axis.
  
      If the points are randomly dispersed around the horizontal axis, a linear
      regression model is appropriate for the data; otherwise, a non-linear
      model is more appropriate.
  
      Parameters
      ----------
      estimator : a Scikit-Learn regressor
          Should be an instance of a regressor, otherwise will raise a
          YellowbrickTypeError exception on instantiation.
          If the estimator is not fitted, it is fit when the visualizer is fitted,
          unless otherwise specified by ``is_fitted``.
  
      X_train : ndarray or DataFrame of shape n x m
          A feature array of n instances with m features the model is trained on.
          Used to fit the visualizer and also to score the visualizer if test splits are
          not directly specified.
  
      y_train : ndarray or Series of length n
          An array or series of target or class values. Used to fit the visualizer and
          also to score the visualizer if test splits are not specified.
  
      X_test : ndarray or DataFrame of shape n x m, default: None
          An optional feature array of n instances with m features that the model
          is scored on if specified, using X_train as the training data.
  
      y_test : ndarray or Series of length n, default: None
          An optional array or series of target or class values that serve as actual
          labels for X_test for scoring purposes.
  
      ax : matplotlib Axes, default: None
          The axes to plot the figure on. If None is passed in the current axes
          will be used (or generated if required).
  
      hist : {True, False, None, 'density', 'frequency'}, default: True
          Draw a histogram showing the distribution of the residuals on the
          right side of the figure. Requires Matplotlib >= 2.0.2.
          If set to 'density', the probability density function will be plotted.
          If set to True or 'frequency' then the frequency will be plotted.
  
      qqplot : {True, False}, default: False
          Draw a Q-Q plot on the right side of the figure, comparing the quantiles
          of the residuals against quantiles of a standard normal distribution.
          Q-Q plot and histogram of residuals can not be plotted simultaneously,
          either `hist` or `qqplot` has to be set to False.
  
      train_color : color, default: 'b'
          Residuals for training data are ploted with this color but also
          given an opacity of 0.5 to ensure that the test data residuals
          are more visible. Can be any matplotlib color.
  
      test_color : color, default: 'g'
          Residuals for test data are plotted with this color. In order to
          create generalizable models, reserved test data residuals are of
          the most analytical interest, so these points are highlighted by
          having full opacity. Can be any matplotlib color.
  
      line_color : color, default: dark grey
          Defines the color of the zero error line, can be any matplotlib color.
  
      train_alpha : float, default: 0.75
          Specify a transparency for traininig data, where 1 is completely opaque
          and 0 is completely transparent. This property makes densely clustered
          points more visible.
  
      test_alpha : float, default: 0.75
          Specify a transparency for test data, where 1 is completely opaque
          and 0 is completely transparent. This property makes densely clustered
          points more visible.
  
      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()``
  
      kwargs : dict
          Keyword arguments that are passed to the base class and may influence
          the visualization as defined in other Visualizers.
  
      Returns
      -------
      viz : ResidualsPlot
          Returns the fitted ResidualsPlot that created the figure.
      """
  
      # Instantiate the visualizer
      viz = ResidualsPlot(
          estimator=estimator,
          ax=ax,
          hist=hist,
          qqplot=qqplot,
          train_color=train_color,
          test_color=test_color,
          line_color=line_color,
          train_alpha=train_alpha,
          test_alpha=test_alpha,
          is_fitted=is_fitted,
          **kwargs,
      )
  
      # Fit the visualizer
      viz.fit(X_train, y_train)
  
      # Score the visualizer
      if X_test is not None and y_test is not None:
          viz.score(X_test, y_test)
      elif X_test is not None or y_test is not None:
          raise YellowbrickValueError(
              "both X_test and y_test are required if one is specified"
          )
      else:
          viz.score(X_train, y_train)
  
      # Draw the final visualization
      if show:
          viz.show()
      else:
          viz.finalize()
  
      # Return the visualizer
      return viz
  
file_path: yellowbrick/yellowbrick/regressor/residuals.py
imports: import matplotlib.pyplot
  from scipy.stats import probplot
  from yellowbrick.draw import manual_legend
  from yellowbrick.utils.decorators import memoized
  from yellowbrick.style.palettes import LINE_COLOR
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.regressor.base import RegressionScoreVisualizer
label_desc: Use image node_id 1 for calling a global function with example usage: residuals_plot(estimator, X_train, y_train, X_test, y_test, ax, hist, qqplot, train_color, test_color, line_color, train_alpha, test_alpha, is_fitted, show) and returns: viz