    def dfs_used_schema(nodes: Dict[str, NodeRepr], name: str, ahead_edge: Set):
        """Get the used schema behind the node.

        Args:
            nodes (`Dict[str, NodeRepr]`): All the nodes from DAG.
            name (`str`): Current node name.
            ahead_edge (`Set`): As set of the ahead edge schema.

        Returns:
           Set: A set of the used schema behind the node.
        """
        ahead_schema = ahead_edge.copy()
        used_schema = set()
        stack = [name]
        visited = [name]
        outputs_schema = ()
        while stack:
            n = stack.pop()
            check_schema = nodes[n].inputs
            used_col = DAGRepr.get_base_col(nodes[n])
            if used_col is not None:
                if isinstance(used_col, str):
                    check_schema += (used_col,)
                else:
                    check_schema += tuple(used_col)

            common_schema = (set(check_schema)-set(outputs_schema)) & ahead_schema
            for x in common_schema:
                ahead_schema.remove(x)
                used_schema.add(x)
            next_nodes = nodes[n].next_nodes
            if len(ahead_schema) == 0:
                break
            if next_nodes is None:
                continue

            for i in next_nodes[::-1]:
                if i not in visited:
                    stack.append(i)
            visited.append(n)
            outputs_schema += nodes[n].outputs

        return used_schema
Get the used schema behind the node.

Args:
nodes (`Dict[str, NodeRepr]`): All the nodes from DAG.
name (`str`): Current node name.
ahead_edge (`Set`): As set of the ahead edge schema.

Returns:
Set: A set of the used schema behind the node.
towhee/runtime/dag_repr.py