code: def get_rrt_feat(t_candidate, hr, path):
      rrt_feat = np.zeros(t_candidate.shape, dtype=np.float16)
      for i in tqdm(range(t_candidate.shape[0])):
          r1 = hr[i, 1]
          for j in range(t_candidate.shape[1]):
              tail = t_candidate[i, j]
              if tail in t2r_prob:
                  for r2 in t2r_prob[tail]:
                      prob = rrt[r1, r2] * r2t_prob[r2][tail]
                      rrt_feat[i, j] += prob
      np.save(path, rrt_feat)
  
file_path: PGL/examples/kddcup2021/WikiKG90M/feature/dump_feat/1_rrt_feat.py
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  import sys
  import argparse
  import logging
  import numpy
  import pickle
  from tqdm import tqdm
  import math
  from multiprocessing import Pool
label_desc: Use image node_id 1 for calling a global function with example usage: get_rrt_feat(t_candidate, hr, path) without return types