class_docstr: A link prediction metric to compute Precision@:math`k`.
  
  Args:
      k (int): The number of top-:math:`k` predictions to evaluate against.
class_docstr_tok: ["A","link","prediction","metric","to","compute","Precision","@",":","math","`","k","`",".","Args",":","k","(","int",")",":","The","number","of","top-",":","math",":","`","k","`","predictions","to","evaluate","against","."]
code: def _compute(self, pred_isin_mat: Tensor, y_count: Tensor) -> Tensor:
      return pred_isin_mat.sum(dim=-1) / self.k
  
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 for calling the LinkPredPrecision obj's underlying member method code with example usage: obj._compute(pred_isin_mat, y_count) and returns: unknown