def post_order_depth_first(graph, start):
    """
    Iterate over the nodes of the graph (is a tree) in a way such that every
    node is preceded by it's childs.
    `graph` is a dict that represents the `Expression` graph. It's a tree too
    beacuse Expressions are trees.
    `start` is the node to use as the root of the tree.
    """
    q = [start]
    seen = set()
    i = 0
    while i != len(graph):
        node = q[i]
        seen.add(node)
        i += 1
        for _, other in graph[node]:
            if isnode(other) and seen not in other:
                q.append(other)
    assert len(q) == len(graph)
    q.reverse()
    return q
dataset/ETHPy150Open machinalis/quepy/quepy/mql_generation.py/post_order_depth_first/swapped operands of `not in`