class_docstr: Test class for `RetrievalNormalizedDCG` metric.
class_docstr_tok: ["Test","class","for","`","RetrievalNormalizedDCG","`","metric","."]
docstr: Test dtype support of the metric on CPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","CPU","."]
code: def test_precision_cpu(
      self, indexes: Tensor, preds: Tensor, target: Tensor
  ):
      """Test dtype support of the metric on CPU."""
      self.run_precision_test_cpu(
          indexes=indexes,
          preds=preds,
          target=target,
          metric_module=RetrievalNormalizedDCG,
          metric_functional=retrieval_normalized_dcg,
      )
  
imports: from typing import Callable, Optional, Union
  import numpy
  import pytest
  import torch
  from sklearn.metrics import ndcg_score
  from torch import Tensor
  from torchmetrics.functional.retrieval.ndcg import retrieval_normalized_dcg
  from torchmetrics.retrieval.ndcg import RetrievalNormalizedDCG
  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_ignore_index, _default_metric_class_input_arguments_with_non_binary_target, _default_metric_functional_input_arguments_with_non_binary_target, _errors_test_class_metric_parameters_k, _errors_test_class_metric_parameters_with_nonbinary, _errors_test_functional_metric_parameters_k, _errors_test_functional_metric_parameters_with_nonbinary
label_desc: Use image node_id 4 for calling the TestNDCG obj's underlying member method code with example usage: obj.test_precision_cpu(indexes, preds, target) without return types