class_docstr: General tester class for retrieval metrics.
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def run_class_metric_test(
      self,
      ddp: bool,
      indexes: Tensor,
      preds: Tensor,
      target: Tensor,
      metric_class: Metric,
      reference_metric: Callable,
      metric_args: dict,
      reverse: bool = False,
  ):
      """Test class implementation of metric."""
      _ref_metric_adapted = partial(
          _compute_sklearn_metric,
          metric=reference_metric,
          reverse=reverse,
          **metric_args,
      )
  
      super().run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=metric_class,
          reference_metric=_ref_metric_adapted,
          metric_args=metric_args,
          fragment_kwargs=True,
          indexes=indexes,  # every additional argument will be passed to metric_class and _ref_metric_adapted
      )
  
imports: from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  import pytest
  import torch
  from numpy import array
  from torch import Tensor, tensor
  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.inputs import _input_retrieval_scores
  from unittests.retrieval.inputs import _input_retrieval_scores_all_target
  from unittests.retrieval.inputs import _input_retrieval_scores_empty
  from unittests.retrieval.inputs import _input_retrieval_scores_extra
  from unittests.retrieval.inputs import _input_retrieval_scores_float_target
  from unittests.retrieval.inputs import _input_retrieval_scores_for_adaptive_k
  from unittests.retrieval.inputs import _input_retrieval_scores_int_target
  from unittests.retrieval.inputs import _input_retrieval_scores_mismatching_sizes
  from unittests.retrieval.inputs import _input_retrieval_scores_mismatching_sizes_func
  from unittests.retrieval.inputs import _input_retrieval_scores_no_target
  from unittests.retrieval.inputs import _input_retrieval_scores_with_ignore_index
  from unittests.retrieval.inputs import _input_retrieval_scores_wrong_targets
label_desc: Use image node_id 1 for calling the RetrievalMetricTester obj's underlying member method code with example usage: obj.run_class_metric_test(ddp, indexes, preds, target, metric_class, reference_metric, metric_args, reverse) without return types