    def get_all_inputs(nodes: Dict[str, NodeRepr], top_sort: list):
        """Get all the inputs of the dag nodes, include ahead and current nodes.

        Args:
            nodes (`Dict[str, NodeRepr]`): All the nodes repr from DAG.
            top_sort (`list`): Topological list.

        Returns:
           Dict[str, Tuple]: Dict of the node and the all inputs of this node.
        """
        all_nodes = [InputConst.name]
        all_inputs = dict((name, nodes[InputConst.name].outputs) for name in nodes)
        for name in top_sort[1:]:
            if nodes[name].iter_info.type == ConcatConst.name:
                pre_name = all_nodes.pop()
                while name in nodes[pre_name].next_nodes:
                    nodes[name].inputs += nodes[pre_name].outputs
                    if len(all_nodes) == 0:
                        break
                    pre_name = all_nodes.pop()
                nodes[name].outputs = nodes[name].inputs
            all_nodes.append(name)
            if nodes[name].next_nodes is None:
                continue
            for n in nodes[name].next_nodes:
                all_inputs[n] = all_inputs[n] + nodes[name].outputs + all_inputs[name]
        return all_inputs
Get all the inputs of the dag nodes, include ahead and current nodes.

Args:
nodes (`Dict[str, NodeRepr]`): All the nodes repr from DAG.
top_sort (`list`): Topological list.

Returns:
Dict[str, Tuple]: Dict of the node and the all inputs of this node.
towhee/runtime/dag_repr.py