def get_nodes(dag):
    """
    Returns the names of all nodes found in dag
    """
    nodes = dag.sig.names
    for node in dag.nodes:
        if node not in nodes and isinstance(node, str):
            nodes.append(node)
    return nodes