def paths_from_root(graph, start):
    """
    Generates paths from `start` to every other node in `graph` and puts it in
    the returned dictionary `paths`.
    ie.: `paths_from_node(graph, start)[node]` is a list of the edge names used
    to get to `node` form `start`.
    """
    paths = {start: []}
    q = [start]
    seen = set()
    while q:
        node = q.pop()
        seen.add(node)
        for relation, child in graph[node]:
            if isnode(child) and seen not in child:
                q.append(child)
                paths[child] = paths[node] + [relation]
    return paths
dataset/ETHPy150Open machinalis/quepy/quepy/mql_generation.py/paths_from_root/swapped operands of `not in`