code: def plot_pr_curves(
      precisions,
      recall,
      classes,
      title=None,
      ax=None,
      figsize=None,
      style=None,
      **kwargs,
  ):
      """Plots a set of per-class precision-recall (PR) curves.
  
      Args:
          precisions: a ``num_classes x num_recalls`` array-like of per-class
              precision values
          recall: an array-like of recall values
          classes: the list of classes
          title (None): a title for the plot
          ax (None): a matplotlib axis to plot in
          figsize (None): a ``(width, height)`` for the figure, in inches
          style (None): a style to use for the plot
          **kwargs: optional keyword arguments for matplotlib's ``plot()``
  
      Returns:
          a matplotlib figure
      """
      # Plot in descending order of AP
      avg_precisions = np.mean(precisions, axis=1)
      inds = np.argsort(
          -avg_precisions
      )  # negative for descending order
  
      if style is None:
          style = _DEFAULT_STYLE
  
      with plt.style.context(style):
          for idx in inds:
              precision = precisions[idx]
              _class = classes[idx]
              avg_precision = avg_precisions[idx]
              label = "AP = %.2f, class = %s" % (avg_precision, _class)
              display = skm.PrecisionRecallDisplay(
                  precision=precision, recall=recall
              )
              display.plot(ax=ax, label=label, **kwargs)
              ax = display.ax_
  
      if ax is None:
          ax = plt.gca()
  
      fig = ax.figure
  
      if figsize is not None:
          fig.set_size_inches(*figsize)
  
      if title is not None:
          fig.suptitle(title)
  
      return fig
  
imports: import itertools
  import logging
  import numpy
  import matplotlib
  from matplotlib.widgets import Button, LassoSelector
  from matplotlib.path import Path
  import matplotlib.pyplot
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from mpl_toolkits.axes_grid1.inset_locator import InsetPosition
  from mpl_toolkits.mplot3d import Axes3D
  import sklearn.metrics.pairwise
  import sklearn.metrics
  import eta.core.utils
  import fiftyone.core.context
  import fiftyone.core.utils
  from .base import InteractivePlot
  from .utils import best_fit_line, load_button_icon, parse_lines_inputs, parse_locations, parse_scatter_inputs
label_desc: Use image node_id 4 for calling a global function with example usage: plot_pr_curves(precisions, recall, classes, title, ax, figsize, style) and returns: fig