class_docstr: A link prediction metric to compute the Normalized Discounted
  Cumulative Gain (NDCG).
  
  Args:
      k (int): The number of top-:math:`k` predictions to evaluate against.
class_docstr_tok: ["A","link","prediction","metric","to","compute","the","Normalized","Discounted","Cumulative","Gain","(","NDCG",")",".","Args",":","k","(","int",")",":","The","number","of","top-",":","math",":","`","k","`","predictions","to","evaluate","against","."]
code: def __init__(self, k: int):
      super().__init__(k=k)
  
      dtype = torch.get_default_dtype()
      multiplier = 1.0 / torch.arange(2, k + 2, dtype=dtype).log2()
  
      self.register_buffer("multiplier", multiplier)
      self.register_buffer("idcg", cumsum(multiplier))
  
imports: from abc import ABC, abstractmethod
  from typing import Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch_geometric.utils import cumsum, scatter
label_desc: Use image node_id 1 to create a new LinkPredNDCG object from inherited base classes: LinkPredMetric with example: obj = LinkPredNDCG(k)