class_docstr: Computes Area Under the Receiver Operating Characteristic Curve (ROC AUC). Referring to:
  `sklearn.metrics.roc_auc_score <https://scikit-learn.org/stable/modules/generated/
  sklearn.metrics.roc_auc_score.html#sklearn.metrics.roc_auc_score>`_.
  The input `y_pred` and `y` can be a list of `channel-first` Tensor or a `batch-first` Tensor.
  
  Example of the typical execution steps of this metric class follows :py:class:`monai.metrics.metric.Cumulative`.
  
  Args:
      average: {``"macro"``, ``"weighted"``, ``"micro"``, ``"none"``}
          Type of averaging performed if not binary classification.
          Defaults to ``"macro"``.
  
          - ``"macro"``: calculate metrics for each label, and find their unweighted mean.
              This does not take label imbalance into account.
          - ``"weighted"``: calculate metrics for each label, and find their average,
              weighted by support (the number of true instances for each label).
          - ``"micro"``: calculate metrics globally by considering each element of the label
              indicator matrix as a label.
          - ``"none"``: the scores for each class are returned.
docstr: Typically `y_pred` and `y` are stored in the cumulative buffers at each iteration,
  This function reads the buffers and computes the area under the ROC.
  
  Args:
      average: {``"macro"``, ``"weighted"``, ``"micro"``, ``"none"``}
          Type of averaging performed if not binary classification. Defaults to `self.average`.
docstr_tok: ["Typically","`","y_pred","`","and","`","y","`","are","stored","in","the","cumulative","buffers","at","each","iteration",",","This","function","reads","the","buffers","and","computes","the","area","under","the","ROC",".","Args",":","average",":","{","``","``","macro","''","``",",","``","``","weighted","''","``",",","``","``","micro","''","``",",","``","``","none","''","``","}","Type","of","averaging","performed","if","not","binary","classification",".","Defaults","to","`","self.average","`","."]
code: def aggregate(
      self, average: Average | str | None = None
  ) -> np.ndarray | float | npt.ArrayLike:
      """
      Typically `y_pred` and `y` are stored in the cumulative buffers at each iteration,
      This function reads the buffers and computes the area under the ROC.
  
      Args:
          average: {``"macro"``, ``"weighted"``, ``"micro"``, ``"none"``}
              Type of averaging performed if not binary classification. Defaults to `self.average`.
  
      """
      y_pred, y = self.get_buffer()
      # compute final value and do metric reduction
      if not isinstance(y_pred, torch.Tensor) or not isinstance(
          y, torch.Tensor
      ):
          raise ValueError("y_pred and y must be PyTorch Tensor.")
  
      return compute_roc_auc(
          y_pred=y_pred, y=y, average=average or self.average
      )
  
file_path: MONAI/monai/metrics/rocauc.py
imports: from __future__ import annotations
  import warnings
  from typing import TYPE_CHECKING, cast
  import numpy
  import torch
  from monai.utils import Average, look_up_option
  from .metric import CumulativeIterationMetric
label_desc: Use image node_id 3 for calling the ROCAUCMetric obj's underlying member method code with example usage: obj.aggregate(average) and returns: compute_roc_auc