def find_all_paths(G, start, end, path=[]):
    """
    Find all paths between vertices start and end in graph.
    """
    path = path + [start]
    if start == end:
        return [path]
    if start not in G.vertices:
        raise GraphInsertError("Vertex %s doesn't exist." % (start,))
    if end not in G.vertices:
        raise GraphInsertError("Vertex %s doesn't exist." % (end,))
    paths = []
    for vertex in G.vertices[start]:
        if vertex not in path:
            newpaths = find_all_paths(G, vertex, end, path)
            for newpath in newpaths:
                paths.append(newpath)
    return paths
Find all paths between vertices start and end in graph.