def dfs_postorder_nodes(graph, root):
  import sys
  sys.setrecursionlimit(500)
  visited = set()

  def _dfs(node, _visited):
    _visited.add(node)
    for edge in graph.out_edges(node):
      dest_node = edge.dest
      if _visited not in dest_node:
        for child in _dfs(dest_node, _visited):
          yield child
    yield node

  return [n for n in _dfs(root, visited)]
dataset/ETHPy150Open neuroo/equip/equip/analysis/graph/traversals.py/dfs_postorder_nodes/swapped operands of `not in`