Checks if the node has dependencies.

def has_dependencies(node, dag):
    """Checks if the node has dependencies."""
    for downstream_nodes in dag.values():
        if node in downstream_nodes:
            return True
    return False