code: def gen_node(content_file, node_map, total_label, fea_len, train_num):
      label_map = {}
      label_cnt = 0
      node_ids = []
      type = []
      label = []
      feature = []
      with open(os.path.realpath(content_file), "r") as f:
          for line in f:
              features = line.strip().split("\t")
              if len(features) != fea_len:
                  continue
              node_ids.append(node_map[features[0]])
              feature.append(np.asarray(features[1:-1], dtype=int))
              if (node_map[features[0]]) > train_num:
                  type.append("test")
              else:
                  type.append("train")
              if not label_map.has_key(features[-1]):
                  label_map[features[-1]] = label_cnt
                  label_cnt += 1
              label.append(
                  int2onehot(label_map[features[-1]], total_label)
              )
      return node_ids, type, label, feature
  
file_path: euler/tf_euler/python/dataset/gcn_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 4 for calling a global function with example usage: gen_node(content_file, node_map, total_label, fea_len, train_num) and returns: node_ids,  type,  label,  feature