code: def gen_node_map(cite_file):
      node_map = {}
      node_index = 0
      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_node = nodes[1].split(":")[1]
              if not node_map.has_key(src_node):
                  node_map[src_node] = node_index
                  node_index += 1
              dst_node = nodes[3].split(":")[1]
              if not node_map.has_key(dst_node):
                  node_map[dst_node] = node_index
                  node_index += 1
      return node_map
  
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 1 for calling a global function with example usage: gen_node_map(cite_file) and returns: node_map