class_docstr: Area under per region overlap (AUPRO) Metric.
class_docstr_tok: ["Area","under","per","region","overlap","(","AUPRO",")","Metric","."]
docstr: Generate a figure containing the PRO curve and the AUPRO.
  
  Returns:
      tuple[Figure, str]: Tuple containing both the figure and the figure title to be used for logging
docstr_tok: ["Generate","a","figure","containing","the","PRO","curve","and","the","AUPRO",".","Returns",":","tuple","[","Figure",",","str","]",":","Tuple","containing","both","the","figure","and","the","figure","title","to","be","used","for","logging"]
code: def generate_figure(self) -> tuple[Figure, str]:
      """Generate a figure containing the PRO curve and the AUPRO.
  
      Returns:
          tuple[Figure, str]: Tuple containing both the figure and the figure title to be used for logging
      """
      fpr, tpr = self._compute()
      aupro = self.compute()
  
      xlim = (0.0, self.fpr_limit.detach_().cpu().numpy())
      ylim = (0.0, 1.0)
      xlabel = "Global FPR"
      ylabel = "Averaged Per-Region TPR"
      loc = "lower right"
      title = "PRO"
  
      fig, _axis = plot_figure(
          fpr, tpr, aupro, xlim, ylim, xlabel, ylabel, loc, title
      )
  
      return fig, "PRO"
  
imports: from __future__ import annotations
  from typing import Any, Callable
  import torch
  from matplotlib.figure import Figure
  from torch import Tensor
  from torchmetrics import Metric
  from torchmetrics.functional import auc
  from torchmetrics.functional.classification import binary_roc
  from torchmetrics.utilities.data import dim_zero_cat
  from anomalib.utils.metrics.pro import connected_components_cpu, connected_components_gpu
  from .binning import thresholds_between_0_and_1, thresholds_between_min_and_max
  from .plotting_utils import plot_figure
label_desc: Use image node_id 7 for calling the AUPRO obj's underlying member method code with example usage: obj.generate_figure() and returns: fig,  str