class_docstr: Test class for `RetrievalNormalizedDCG` metric.
class_docstr_tok: ["Test","class","for","`","RetrievalNormalizedDCG","`","metric","."]
docstr: Test that specific errors are raised for incorrect input.
docstr_tok: ["Test","that","specific","errors","are","raised","for","incorrect","input","."]
code: def test_arguments_functional_metric(
      self,
      preds: Tensor,
      target: Tensor,
      message: str,
      metric_args: dict,
  ):
      """Test that specific errors are raised for incorrect input."""
      if target.is_floating_point():
          pytest.skip("NDCG metric works with float target input")
  
      self.run_functional_metric_arguments_test(
          preds=preds,
          target=target,
          metric_functional=retrieval_normalized_dcg,
          message=message,
          exception_type=ValueError,
          kwargs_update=metric_args,
      )
  
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 7 for calling the TestNDCG obj's underlying member method code with example usage: obj.test_arguments_functional_metric(preds, target, message, metric_args) without return types