code: def _plot_df(
      df,
      metrics,
      kind,
      subplots,
      legend_label,
      df_all_errors=None,
      **kwargs,
  ):
      r"""Plot the data with or without errors.
  
      Parameters
      ----------
      df : pd.DataFrame
          The collection of disaggregated metric values, along with the metric errors.
  
      metrics : str or list of str
          The name of the metrics to plot.
          Should match columns from the given :class:`fairlearn.metrics.MetricFrame`.
  
      kind : str
          The type of plot to display, e.g., "point", "bar", "line", etc.
          The supported values are "point" and those listed in :meth:`pandas.DataFrame.plot`
  
      subplots : bool
          Whether or not to plot metrics on separate subplots
  
      legend_label : str
          The label corresponding to the confidence interval bars
  
      df_all_errors : pd.DataFrame, default=None
          Optional argument for DataFrame that indicates the errors to plot
  
      \*\*kwargs
          Keyword arguments that are passed in to :meth:`pandas.DataFrame.plot`.
  
      Returns
      -------
      :class:`matplotlib.axes.Axes` or :class:`numpy.ndarray` of them
      """
      if df_all_errors is not None:
          yerr = np.array(
              [
                  np.array([[*row] for row in df_all_errors[metric]]).T
                  for metric in metrics
              ]
          )
          if kind == "point":
              axs = df[metrics].plot(
                  linestyle="",
                  marker="o",
                  yerr=yerr,
                  subplots=subplots,
                  **kwargs,
              )
          else:
              axs = df[metrics].plot(
                  kind=kind, yerr=yerr, subplots=subplots, **kwargs
              )
  
          if isinstance(axs, np.ndarray):
              for ax in axs.flatten():
                  _build_legend(ax, kind, legend_label)
          else:
              _build_legend(axs, kind, legend_label)
  
      else:
          if kind == "point":
              axs = df[metrics].plot(
                  linestyle="", marker="o", subplots=subplots, **kwargs
              )
          else:
              axs = df[metrics].plot(
                  kind=kind, subplots=subplots, **kwargs
              )
  
      return axs
  
file_path: fairlearn/fairlearn/metrics/_plotter.py
imports: from typing import List, Union
  import numpy
  import pandas
  from matplotlib.lines import Line2D
  from sklearn.utils import check_consistent_length
  from ._metric_frame import MetricFrame
label_desc: Use image node_id 3 for calling a global function with example usage: _plot_df(df, metrics, kind, subplots, legend_label, df_all_errors) and returns: axs