code: def gen_node(content_file, node_map, total_label, fea_len, train_num):
      node_ids = []
      type = []
      label = []
      feature = []
      with open(os.path.realpath(content_file), "r") as f:
          for line in f:
              if len(line.strip().split("\t")) == 2:
                  continue
              if line.strip().startswith("cat=1,2,3"):
                  feature_map = gen_feature_map(line.strip())
              else:
                  features = line.strip().split("\t")
                  node_ids.append(node_map[features[0]])
                  label.append(
                      int2onehot(
                          int(features[1].split("=")[1]) - 1,
                          total_label,
                      )
                  )
                  one_features = np.zeros(len(feature_map), dtype=float)
                  for one_fea in features[2:-1]:
                      fea_name = one_fea.split("=")[0]
                      fea_val = one_fea.split("=")[1]
                      one_features[feature_map[fea_name]] = fea_val
                  feature.append(one_features)
                  if (node_map[features[0]]) > train_num:
                      type.append("test")
                  else:
                      type.append("train")
      return node_ids, type, label, feature
  
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 5 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