code: def plotly_pr_auc_curve(
      precision, recall, thresholds, score, cutoff=None, round=2
  ):
      """Generate Precision-Recall Area Under Curve plot
  
      Args:
          true_y (np.ndarray): array of tru labels
          pred_probas (np.ndarray): array of predicted probabilities
          cutoff (float, optional): model cutoff to display in graph. Defaults to None.
          round (int, optional): rounding to apply to floats. Defaults to 2.
  
      Returns:
          Plotly fig:
      """
  
      trace0 = go.Scatter(
          x=precision,
          y=recall,
          mode="lines",
          name="PR AUC CURVE",
          text=[
              f"threshold: {th:.{round}f} <br>"
              + f"precision: {p:.{round}f} <br>"
              + f"recall: {r:.{round}f}"
              for p, r, th in zip(precision, recall, thresholds)
          ],
          hoverinfo="text",
      )
      data = [trace0]
      layout = go.Layout(
          title="PR AUC CURVE",
          #    width=450,
          #    height=450,
          xaxis=dict(
              title="Precision", range=[0, 1], constrain="domain"
          ),
          yaxis=dict(
              title="Recall",
              range=[0, 1],
              constrain="domain",
              scaleanchor="x",
              scaleratio=1,
          ),
          hovermode="closest",
          plot_bgcolor="#fff",
      )
      fig = go.Figure(data, layout)
      shapes = []
  
      if cutoff is not None:
          threshold_idx = np.argmin(np.abs(thresholds - cutoff))
          cutoff_recall = recall[threshold_idx]
          cutoff_precision = precision[threshold_idx]
          shapes.append(
              dict(
                  type="line",
                  xref="x",
                  yref="y",
                  x0=0,
                  x1=1,
                  y0=cutoff_recall,
                  y1=cutoff_recall,
                  line=dict(color="lightslategray", width=1),
              )
          )
          shapes.append(
              dict(
                  type="line",
                  xref="x",
                  yref="y",
                  x0=cutoff_precision,
                  x1=cutoff_precision,
                  y0=0,
                  y1=1,
                  line=dict(color="lightslategray", width=1),
              )
          )
  
          annotations = [
              go.layout.Annotation(
                  x=0.15,
                  y=0.40,
                  text=f"pr-auc-score: {score:.{round}f}",
                  showarrow=False,
                  align="right",
                  xanchor="left",
                  yanchor="top",
              ),
              go.layout.Annotation(
                  x=0.15,
                  y=0.35,
                  text=f"cutoff: {cutoff:.{round}f}",
                  showarrow=False,
                  align="right",
                  xanchor="left",
                  yanchor="top",
              ),
              go.layout.Annotation(
                  x=0.15,
                  y=0.3,
                  text=f"precision: {cutoff_precision:.{round}f}",
                  showarrow=False,
                  align="right",
                  xanchor="left",
                  yanchor="top",
              ),
              go.layout.Annotation(
                  x=0.15,
                  y=0.25,
                  text=f"recall: {cutoff_recall:.{round}f}",
                  showarrow=False,
                  align="right",
                  xanchor="left",
                  yanchor="top",
              ),
          ]
          fig.update_layout(annotations=annotations)
  
      fig.update_layout(shapes=shapes)
      fig.update_layout(margin=dict(t=40, b=40, l=40, r=40))
      return fig
  
imports: import warnings
  import numpy
  import pandas
  from pandas.api.types import is_numeric_dtype
  import plotly.graph_objs
  from plotly.subplots import make_subplots
  from sklearn.metrics import classification_report, confusion_matrix, precision_recall_curve, roc_curve, roc_auc_score, average_precision_score
  from .explainer_methods import matching_cols, safe_isinstance
label_desc: Use image node_id 13 for calling a global function with example usage: plotly_pr_auc_curve(precision, recall, thresholds, score, cutoff, round) and returns: fig