def get_orphan_nodes(dag):
    """Get orphan nodes for given dag."""
    independent_nodes = get_independent_nodes(dag)
    return set([node for node in independent_nodes if not dag[node]])
Get orphan nodes for given dag.