class_docstr: Test class for `RetrievalAUROC` metric.
class_docstr_tok: ["Test","class","for","`","RetrievalAUROC","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_functional_metric(
      self,
      preds: Tensor,
      target: Tensor,
      k: int,
      max_fpr: Optional[float],
  ):
      """Test functional implementation of metric."""
      self.run_functional_metric_test(
          preds=preds,
          target=target,
          metric_functional=retrieval_auroc,
          reference_metric=_auroc_at_k,
          metric_args={},
          top_k=k,
          max_fpr=max_fpr,
      )
  
file_path: torchmetrics/tests/unittests/retrieval/test_auroc.py
imports: from typing import Callable, Optional, Union
  import numpy
  import pytest
  from sklearn.metrics import roc_auc_score
  from torch import Tensor
  from torchmetrics.functional.retrieval.auroc import retrieval_auroc
  from torchmetrics.retrieval.auroc import RetrievalAUROC
  from typing_extensions import Literal
  from unittests.helpers import seed_all
  from unittests.retrieval.helpers import RetrievalMetricTester, _concat_tests, _custom_aggregate_fn, _default_metric_class_input_arguments, _default_metric_class_input_arguments_ignore_index, _default_metric_functional_input_arguments, _errors_test_class_metric_parameters_default, _errors_test_class_metric_parameters_k, _errors_test_class_metric_parameters_no_pos_target, _errors_test_functional_metric_parameters_default, _errors_test_functional_metric_parameters_k
label_desc: Use image node_id 3 for calling the TestAUROC obj's underlying member method code with example usage: obj.test_functional_metric(preds, target, k, max_fpr) without return types