code: def test_auc(x, y, expected, unsqueeze_x, unsqueeze_y):
      """Test that auc function gives the expected result."""
      x = tensor(x)
      y = tensor(y)
  
      if unsqueeze_x:
          x = x.unsqueeze(-1)
  
      if unsqueeze_y:
          y = y.unsqueeze(-1)
  
      # Test Area Under Curve (AUC) computation
      assert auc(x, y, reorder=True) == expected
  
file_path: torchmetrics/tests/unittests/utilities/test_auc.py
imports: from functools import partial
  from typing import NamedTuple
  import numpy
  import pytest
  from sklearn.metrics import auc
  from torch import Tensor, tensor
  from torchmetrics.utilities.compute import auc
  from unittests import NUM_BATCHES
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling a global function with example usage: test_auc(x, y, expected, unsqueeze_x, unsqueeze_y) without return types