code: def compute_fp_tp_probs(
      probs: NdarrayOrTensor,
      y_coord: NdarrayOrTensor,
      x_coord: NdarrayOrTensor,
      evaluation_mask: NdarrayOrTensor,
      labels_to_exclude: list | None = None,
      resolution_level: int = 0,
  ) -> tuple[NdarrayOrTensor, NdarrayOrTensor, int]:
      """
      This function is modified from the official evaluation code of
      `CAMELYON 16 Challenge <https://camelyon16.grand-challenge.org/>`_, and used to distinguish
      true positive and false positive predictions. A true positive prediction is defined when
      the detection point is within the annotated ground truth region.
  
      Args:
          probs: an array with shape (n,) that represents the probabilities of the detections.
              Where, n is the number of predicted detections.
          y_coord: an array with shape (n,) that represents the Y-coordinates of the detections.
          x_coord: an array with shape (n,) that represents the X-coordinates of the detections.
          evaluation_mask: the ground truth mask for evaluation.
          labels_to_exclude: labels in this list will not be counted for metric calculation.
          resolution_level: the level at which the evaluation mask is made.
  
      Returns:
          fp_probs: an array that contains the probabilities of the false positive detections.
          tp_probs: an array that contains the probabilities of the True positive detections.
          num_targets: the total number of targets (excluding `labels_to_exclude`) for all images under evaluation.
  
      """
      if isinstance(y_coord, torch.Tensor):
          y_coord = y_coord.detach().cpu().numpy()
      if isinstance(x_coord, torch.Tensor):
          x_coord = x_coord.detach().cpu().numpy()
  
      y_coord = (y_coord / pow(2, resolution_level)).astype(int)
      x_coord = (x_coord / pow(2, resolution_level)).astype(int)
  
      stacked = np.stack([y_coord, x_coord], axis=1)
  
      return compute_fp_tp_probs_nd(
          probs=probs,
          coords=stacked,
          evaluation_mask=evaluation_mask,
          labels_to_exclude=labels_to_exclude,
      )
  
file_path: MONAI/monai/metrics/froc.py
imports: from __future__ import annotations
  from typing import Any, cast
  import numpy
  import torch
  from monai.config import NdarrayOrTensor
label_desc: Use image node_id 2 for calling a global function with example usage: compute_fp_tp_probs(probs, y_coord, x_coord, evaluation_mask, labels_to_exclude, resolution_level) and returns: compute_fp_tp_probs_nd