code: def test_corner_case_with_tied_scores():
      """See issue: https://github.com/Lightning-AI/torchmetrics/issues/2022."""
      target = torch.tensor([[10, 0, 0, 1, 5]])
      preds = torch.tensor([[0.1, 0, 0, 0, 0.1]])
  
      for k in [1, 3, 5]:
          assert torch.allclose(
              retrieval_normalized_dcg(preds, target, top_k=k),
              torch.tensor(
                  [ndcg_score(target, preds, k=k)], dtype=torch.float32
              ),
          )
  
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 2 for calling a global function with example usage: test_corner_case_with_tied_scores() without return types