def find_all_paths(graph, start, end, path=[]):
    path = path + [start]
if start == end:
    return [path]
paths = []
for node in (set(graph.neighbors(start)) - set(path)):
    paths.extend(find_all_paths(graph, node, end, path))
return paths
Path between two nodes