code: def get_mrr(score, idx):
      top10 = np.argsort(-score, -1)[:, :10]
      mrrs = []
      failed = []
      for en, (i, t) in enumerate(zip(idx, top10)):
          if i in t:
              mrr = 1 / (list(t).index(i) + 1)
          else:
              mrr = 0
          if mrr != 1:
              failed.append(en)
          mrrs.append(mrr)
      return sum(mrrs) / len(mrrs)
  
file_path: PGL/examples/kddcup2021/WikiKG90M/ensemble/ensemble.py
imports: import pgl
  import numpy
  from tqdm import tqdm
  import pandas
  import torch
  from ogb.lsc import WikiKG90MDataset, WikiKG90MEvaluator
label_desc: Use image node_id 2 for calling a global function with example usage: get_mrr(score, idx) and returns: unknown