def get_independent_nodes(dag):
nodes = set(dag.keys())<EOL>dependent_nodes = set([node for downstream_nodes in dag.values() for node in downstream_nodes])<EOL>return set(nodes - dependent_nodes)<EOL>
Get a list of all node in the graph with no dependencies.