code: def compute_roc(
      y_true: np.ndarray, amaps: np.ndarray, steps=500
  ) -> float:
      y_true = y_true.squeeze()
  
      tprs = []
      fprs = []
      for th in tqdm(
          get_thresholds(amaps, steps, True, True)
      ):  # thresholds[::-1]:#
          binary_amaps = amaps.squeeze() > th
          TP_pixels = np.logical_and(y_true, binary_amaps).sum()
          tpr = TP_pixels / y_true.sum()
          tprs.append(tpr)
  
          inverse_masks = 1 - y_true
          FP_pixels = np.logical_and(inverse_masks, binary_amaps).sum()
          fpr = FP_pixels / inverse_masks.sum()
          fprs.append(fpr)
  
      # print(np.array(list(zip(pros,fprs))))
      fprs = np.array(fprs)
      tprs = np.array(tprs)
      return fprs, tprs
  
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 14 for calling a global function with example usage: compute_roc(y_true, amaps, steps) and returns: fprs,  tprs