code: def _auc_compute_without_check(
      x: Tensor, y: Tensor, direction: float, axis: int = -1
  ) -> Tensor:
      """Compute area under the curve using the trapezoidal rule.
  
      Assumes increasing or decreasing order of `x`.
  
      """
      with torch.no_grad():
          auc_: Tensor = torch.trapz(y, x, dim=axis) * direction
      return auc_
  
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 6 for calling a global function with example usage: _auc_compute_without_check(x, y, direction, axis) and returns: auc_