code: def sk_auc(x, y, reorder=False):
      """Comparison function for correctness of auc implementation."""
      x = x.flatten()
      y = y.flatten()
      if reorder:
          idx = np.argsort(x, kind="stable")
          x = x[idx]
          y = y[idx]
      return _sk_auc(x, y)
  
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 1 for calling a global function with example usage: sk_auc(x, y, reorder) and returns: _sk_auc