def get_successors(graph):
    """Returns a dict of all successors of each node."""
    d = {}
    for e in graph.get_edge_list():
        src = e.get_source()
        dst = e.get_destination()
        if src in d.keys():
            d[src].add(dst)
        else:
            d[src] = set([dst])
    return d