code: def _binary_clf_curve(trues, preds):
      """Calculate true and false positives per binary classification threshold
  
      Args:
          trues (numpy.ndarray): the true scores' list
          preds (numpy.ndarray): the predict scores' list
  
      Returns:
          fps (numpy.ndarray): A count of false positives, at index i being the number of negative
          samples assigned a score >= thresholds[i]
          preds (numpy.ndarray): An increasing count of true positives, at index i being the number
          of positive samples assigned a score >= thresholds[i].
  
      Note:
          To improve efficiency, we referred to the source code(which is available at sklearn.metrics.roc_curve)
          in SkLearn and made some optimizations.
  
      """
      trues = trues == 1
  
      desc_idxs = np.argsort(preds)[::-1]
      preds = preds[desc_idxs]
      trues = trues[desc_idxs]
  
      unique_val_idxs = np.where(np.diff(preds))[0]
      threshold_idxs = np.r_[unique_val_idxs, trues.size - 1]
  
      tps = np.cumsum(trues)[threshold_idxs]
      fps = 1 + threshold_idxs - tps
      return fps, tps
  
imports: import itertools
  import numpy
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: _binary_clf_curve(trues, preds) and returns: fps,  tps