code: def save_test_submission(
      self, input_dict: Dict, dir_path: str, mode: str
  ):
      assert "h,r->t" in input_dict
      assert "t_pred_top10" in input_dict["h,r->t"]
      assert mode in ["test-dev", "test-challenge"]
  
      t_pred_top10 = input_dict["h,r->t"]["t_pred_top10"]
  
      for i in range(len(t_pred_top10)):
          assert len(
              pd.unique(t_pred_top10[i][t_pred_top10[i] >= 0])
          ) == len(
              t_pred_top10[i][t_pred_top10[i] >= 0]
          ), "Found duplicated tail prediction for some triplets!"
  
      if mode == "test-dev":
          assert t_pred_top10.shape == (15000, 10)
          filename = osp.join(dir_path, "t_pred_wikikg90m-v2_test-dev")
      elif mode == "test-challenge":
          assert t_pred_top10.shape == (10000, 10)
          filename = osp.join(
              dir_path, "t_pred_wikikg90m-v2_test-challenge"
          )
  
      makedirs(dir_path)
  
      if isinstance(t_pred_top10, torch.Tensor):
          t_pred_top10 = t_pred_top10.cpu().numpy()
      t_pred_top10 = t_pred_top10.astype(np.int32)
  
      np.savez_compressed(filename, t_pred_top10=t_pred_top10)
  
imports: from typing import Optional, Union, Dict
  import os
  import shutil
  import os.path
  import torch
  import numpy
  import pandas
  from ogb.utils.url import decide_download, download_url, extract_zip, makedirs
label_desc: Use image node_id 3 for calling the WikiKG90Mv2Evaluator obj's underlying member method code with example usage: obj.save_test_submission(input_dict, dir_path, mode) without return types