code: def auc(x: Tensor, y: Tensor, reorder: bool = False) -> Tensor:
      """Compute Area Under the Curve (AUC) using the trapezoidal rule.
  
      Args:
          x: x-coordinates, must be either increasing or decreasing
          y: y-coordinates
          reorder: if True, will reorder the arrays to make it either increasing or decreasing
  
      Return:
          Tensor containing AUC score
  
      """
      x, y = _auc_format_inputs(x, y)
      return _auc_compute(x, y, reorder=reorder)
  
file_path: torchmetrics/src/torchmetrics/utilities/compute.py
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 8 for calling a global function with example usage: auc(x, y, reorder) and returns: _auc_compute