code: def gen_edge(cite_file, node_map, train_num):
      src = []
      dst = []
      type = []
      with open(os.path.realpath(cite_file), "r") as f:
          for line in f:
              nodes = line.strip().split("\t")
              if len(nodes) != 4:
                  continue
              src.append(node_map[nodes[1].split(":")[1]])
              dst.append(node_map[nodes[3].split(":")[1]])
              if (
                  node_map[nodes[1].split(":")[1]] > train_num
                  or node_map[nodes[3].split(":")[1]] > train_num
              ):
                  type.append("train_removed")
              else:
                  type.append("train")
      return src, dst, type
  
file_path: euler/tf_euler/python/dataset/pubmed_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: gen_edge(cite_file, node_map, train_num) and returns: src,  dst,  type