code: def forward(self, logits: np.ndarray, labels: np.ndarray) -> float:  # type: ignore
      if metrics is None:
          return 0.0
      logits = get_full_logits(logits)
      num_classes = logits.shape[1]
      probabilities = softmax(logits)
      labels = labels.ravel()
      if num_classes == 2:
          return metrics.roc_auc_score(labels, probabilities[..., 1])
      return metrics.roc_auc_score(
          labels, probabilities, multi_class="ovr"
      )
  
imports: import numpy
  from typing import Any
  from typing import Tuple
  from typing import Optional
  from cftool.misc import print_warning
  from cftool.array import iou
  from cftool.array import corr
  from cftool.array import softmax
  from cftool.array import get_full_logits
  from cftool.array import get_label_predictions
  from cftool.types import np_dict_type
  from .schema import IMetric
  from .schema import IDataLoader
  from .constants import LABEL_KEY
  from .constants import PREDICTIONS_KEY
  from .misc.toolkit import insert_intermediate_dims
label_desc: Use image node_id 4 for calling the AUC obj's underlying member method code with example usage: obj.forward(logits, labels) and returns: metrics, int, metrics