def bfs_paths(graph, start):
    queue = deque([[start]])
    while queue:
        path = queue.popleft()
        adj = [path + [node] for node in graph[path[-1]] if node not in path]
        if adj:
            queue += adj
        else:
            yield path
dataset/ETHPy150Open bioinformed/vgraph/vgraph/graph.py/bfs_paths/original