def jit_graph(data):
 G = nx.Graph()
 for node in data:
  G.add_node(node['id'], **node['data'])
  if (node.get('adjacencies') is not None):
   for adj in node['adjacencies']:
    G.add_edge(node['id'], adj['nodeTo'], **adj['data'])
 return G

def jit_graph ( data ) : G = nx . Graph ( ) for node in data : G . add_node ( node [ 'id' ] , ** node [ 'data' ] ) if ( node . get ( 'adjacencies' ) is not None ) : for adj in node [ 'adjacencies' ] : G . add_edge ( node [ 'id' ] , adj [ 'nodeTo' ] , ** adj [ 'data' ] ) return G
read a graph from jit json .