code: def graph_loads(js):
      layers = []
      for layer in js["layers"]:
          p = Layer(
              layer["type"],
              layer["input"],
              layer["output"],
              layer["size"],
          )
          p.is_delete = layer["is_delete"]
          layers.append(p)
      graph = Graph(js["max_layer_num"], [], [], [])
      graph.layers = layers
      return graph
  
imports: import copy
  import json
  import random
  from enum import Enum, unique
label_desc: Use image node_id 2 for calling a global function with example usage: graph_loads(js) and returns: graph