code: def gen_graph_json(
      edge_list, indicator_list, graph_labels, node_labels
  ):
      graph = {}
      graph["nodes"] = []
      graph["edges"] = []
      print("Total nodes: {}.".format(len(node_labels)))
      for i in range(len(node_labels)):
          node_id = i
          node_label = [node_labels[i]]
          node_graph_label = [graph_labels[indicator_list[i]]]
          graph_indicator = str(indicator_list[i])
          features = [
              {"name": "f1", "type": "sparse", "value": node_label},
              {
                  "name": "label",
                  "type": "dense",
                  "value": node_graph_label,
              },
              {
                  "name": "graph_label",
                  "type": "binary",
                  "value": graph_indicator,
              },
          ]
          node = {
              "id": node_id,
              "type": node_labels[i],
              "weight": 1,
              "features": features,
          }
          graph["nodes"].append(node)
      for one_edge in edge_list:
          src = one_edge[0]
          dst = one_edge[1]
          edge = {
              "src": src,
              "dst": dst,
              "type": 0,
              "weight": 1,
              "features": [],
          }
          graph["edges"].append(edge)
      return json.dumps(graph)
  
file_path: euler/tf_euler/python/dataset/multigraph_util.py
imports: import sys
  import os
  import json
  import csv
  import random
label_desc: Use image node_id 5 for calling a global function with example usage: gen_graph_json(edge_list, indicator_list, graph_labels, node_labels) and returns: json