class_docstr: Test class for `RetrievalPrecisionRecallCurveTester` metric.
class_docstr_tok: ["Test","class","for","`","RetrievalPrecisionRecallCurveTester","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_class_metric(
      self,
      indexes,
      preds,
      target,
      ddp,
      empty_target_action,
      ignore_index,
      max_k,
      adaptive_k,
      aggregation,
  ):
      """Test class implementation of metric."""
      metric_args = {
          "max_k": max_k,
          "adaptive_k": adaptive_k,
          "empty_target_action": empty_target_action,
          "ignore_index": ignore_index,
          "aggregation": aggregation,
      }
  
      self.run_class_metric_test(
          ddp=ddp,
          indexes=indexes,
          preds=preds,
          target=target,
          metric_class=RetrievalPrecisionRecallCurve,
          reference_metric=_compute_precision_recall_curve,
          metric_args=metric_args,
      )
  
imports: from functools import partial
  from typing import Callable, Optional, Tuple, Union
  import numpy
  import pytest
  import torch
  from numpy import array
  from torch import Tensor, tensor
  from torchmetrics.retrieval import RetrievalPrecisionRecallCurve
  from torchmetrics.retrieval.base import _retrieval_aggregate
  from typing_extensions import Literal
  from unittests.helpers import seed_all
  from unittests.helpers.testers import Metric, MetricTester
  from unittests.retrieval.helpers import _custom_aggregate_fn, _default_metric_class_input_arguments, get_group_indexes
  from unittests.retrieval.test_precision import _precision_at_k
  from unittests.retrieval.test_recall import _recall_at_k
label_desc: Use image node_id 1 for calling the TestRetrievalPrecisionRecallCurve obj's underlying member method code with example usage: obj.test_class_metric(indexes, preds, target, ddp, empty_target_action, ignore_index, max_k, adaptive_k, aggregation) without return types