code: def compute_pro_(
      y_true: np.ndarray, binary_amaps: np.ndarray, method="mean"
  ) -> float:
      pros = []
      for binary_amap, mask in zip(binary_amaps, y_true):
          per_region_tpr = []
          for region in measure.regionprops(measure.label(mask)):
              axes0_ids = region.coords[:, 0]
              axes1_ids = region.coords[:, 1]
              TP_pixels = binary_amap[axes0_ids, axes1_ids].sum()
              per_region_tpr.append(TP_pixels / region.area)
          if method == "mean" and per_region_tpr:
              pros.append(np.mean(per_region_tpr))
          else:
              pros.extend(per_region_tpr)
      return np.mean(pros)
  
imports: import os
  import argparse
  import numpy
  import matplotlib
  import matplotlib.pyplot
  from sklearn.metrics import roc_curve, auc
  from tqdm import tqdm
  from skimage import measure, morphology
  from skimage.segmentation import mark_boundaries
  import paddle
label_desc: Use image node_id 9 for calling a global function with example usage: compute_pro_(y_true, binary_amaps, method) and returns: np