code: def __init__(self, model=None, data_loader=None, use_gpu=True):
      base_file = os.path.abspath(
          os.path.join(os.path.dirname(__file__), "../release/Base.so")
      )
      self.lib = ctypes.cdll.LoadLibrary(base_file)
      self.lib.testHead.argtypes = [
          ctypes.c_void_p,
          ctypes.c_int64,
          ctypes.c_int64,
      ]
      self.lib.testTail.argtypes = [
          ctypes.c_void_p,
          ctypes.c_int64,
          ctypes.c_int64,
      ]
      self.lib.test_link_prediction.argtypes = [ctypes.c_int64]
  
      self.lib.getTestLinkMRR.argtypes = [ctypes.c_int64]
      self.lib.getTestLinkMR.argtypes = [ctypes.c_int64]
      self.lib.getTestLinkHit10.argtypes = [ctypes.c_int64]
      self.lib.getTestLinkHit3.argtypes = [ctypes.c_int64]
      self.lib.getTestLinkHit1.argtypes = [ctypes.c_int64]
  
      self.lib.getTestLinkMRR.restype = ctypes.c_float
      self.lib.getTestLinkMR.restype = ctypes.c_float
      self.lib.getTestLinkHit10.restype = ctypes.c_float
      self.lib.getTestLinkHit3.restype = ctypes.c_float
      self.lib.getTestLinkHit1.restype = ctypes.c_float
  
      self.model = model
      self.data_loader = data_loader
      self.use_gpu = use_gpu
  
      if self.use_gpu:
          self.model.cuda()
  
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 1 to create a new Tester object from inherited base classes: object with example: obj = Tester(model, data_loader, use_gpu)