def LoadEdges(filename, targets):
 file = open('dump.json')
 edges = json.load(file)
 file.close()
 target_edges = {}
 to_visit = targets[:]
 while to_visit:
  src = to_visit.pop()
  if (src in target_edges):
   continue
  target_edges[src] = edges[src]
  to_visit.extend(edges[src])
 return target_edges

def LoadEdges ( filename , targets ) : file = open ( 'dump.json' ) edges = json . load ( file ) file . close ( ) target_edges = { } to_visit = targets [ : ] while to_visit : src = to_visit . pop ( ) if ( src in target_edges ) : continue target_edges [ src ] = edges [ src ] to_visit . extend ( edges [ src ] ) return target_edges
load the edges map from the dump file .