def load(fname):
    G = nx.DiGraph()
d = simplejson.load(open(fname))
for item in d:
    for attribute, value in item.items():
        subject_id, object_id = value['subject_id'], value['object_id']
if G.has_edge(subject_id, object_id):
    G[subject_id][object_id]['weight'] += 1
else:
    G.add_edge(subject_id, object_id, weight=1)
return G
Обновление информации о весе в зависимости от повторения ребер с networkx