@classmethod
def from_transpose(cls, transpose_graph):
    """ Generate a graph by transposing another graph (reversing all of its
            edges) """
    g = cls()
    for v in transpose_graph.vertices:
        g.add_vertex(v.val)
    for e in transpose_graph.edges:
        g.add_edge((e.v_to.val, e.v_from.val))
    return g
