code: def run_link_prediction(self, type_constrain=False):
      self.lib.initTest()
      self.data_loader.set_sampling_mode("link")
      if type_constrain:
          type_constrain = 1
      else:
          type_constrain = 0
      training_range = tqdm(self.data_loader)
      for index, [data_head, data_tail] in enumerate(training_range):
          score = self.test_one_step(data_head)
          self.lib.testHead(
              score.__array_interface__["data"][0],
              index,
              type_constrain,
          )
          score = self.test_one_step(data_tail)
          self.lib.testTail(
              score.__array_interface__["data"][0],
              index,
              type_constrain,
          )
      self.lib.test_link_prediction(type_constrain)
  
      mrr = self.lib.getTestLinkMRR(type_constrain)
      mr = self.lib.getTestLinkMR(type_constrain)
      hit10 = self.lib.getTestLinkHit10(type_constrain)
      hit3 = self.lib.getTestLinkHit3(type_constrain)
      hit1 = self.lib.getTestLinkHit1(type_constrain)
      print(hit10)
      return mrr, mr, hit10, hit3, hit1
  
imports: import torch
  import torch.nn
  from torch.autograd import Variable
  import torch.optim
  import os
  import time
  import sys
  import datetime
  import ctypes
  import json
  import numpy
  from sklearn.metrics import roc_auc_score
  import copy
  from tqdm import tqdm
label_desc: Use image node_id 7 for calling the Tester obj's underlying member method code with example usage: obj.run_link_prediction(type_constrain) and returns: mrr,  mr,  hit10,  hit3,  hit1