code: def evaluate_wikikg90m(model, loader, mode, save_path):
      from ogb.lsc import WikiKG90MEvaluator
  
      evaluator = WikiKG90MEvaluator()
      model.eval()
      with paddle.no_grad():
          top_tens = []
          corr_idx = []
          for h, r, t_idx, cand_t in tqdm(loader):
              score = model.predict(h, r, cand_t)
              rank = paddle.argsort(score, axis=1, descending=True)
              top_tens.append(rank[:, :10].numpy())
              corr_idx.append(t_idx.numpy())
          t_pred_top10 = np.concatenate(top_tens, axis=0)
          t_correct_index = np.concatenate(corr_idx, axis=0)
          input_dict = {}
          if mode == "valid":
              input_dict["h,r->t"] = {
                  "t_pred_top10": t_pred_top10,
                  "t_correct_index": t_correct_index,
              }
              result = evaluator.eval(input_dict)
              logging.info("-- %s results -------------" % mode)
              logging.info(
                  " ".join(
                      ["{}: {}".format(k, v) for k, v in result.items()]
                  )
              )
          else:
              input_dict["h,r->t"] = {"t_pred_top10": t_pred_top10}
              evaluator.save_test_submission(
                  input_dict=input_dict, dir_path=save_path
              )
  
imports: import os
  import csv
  import math
  import json
  import time
  import random
  import logging
  import functools
  import traceback
  from collections import defaultdict
  from _thread import start_new_thread
  from multiprocessing import Queue, Process
  import numpy
  from tqdm import tqdm
  import paddle
  import paddle.distributed
label_desc: Use image node_id 8 for calling a global function with example usage: evaluate_wikikg90m(model, loader, mode, save_path) without return types