class_docstr: A `DAGRepr` represents a complete DAG.
  
  Args:
      nodes (`Dict[str, NodeRepr]`): All nodes in the dag, which start with _input and end with _output node.
      edges (`Dict[int, List]`): The edges about data queue schema, such as:
                          { 0: {'data': [(a, ColumnType.SCALAR), (b, ColumnType.SCALAR)], 'schema': {'a', SchemaRepr, 'b', SchemaRepr}}
                            1: {'data': [(b, ColumnType.SCALAR), (c, ColumnType.SCALAR)], 'schema': {'b', SchemaRepr, 'c', SchemaRepr}}
                            2: {'data': [(a, ColumnType.SCALAR), (c, ColumnType.SCALAR)], 'schema': {'a', SchemaRepr, 'c', SchemaRepr}}
                          }
      dag_dict(`Dict`): The dag dict.
class_docstr_tok: ["A","`","DAGRepr","`","represents","a","complete","DAG",".","Args",":","nodes","(","`","Dict","[","str",",","NodeRepr","]","`",")",":","All","nodes","in","the","dag",",","which","start","with","_input","and","end","with","_output","node",".","edges","(","`","Dict","[","int",",","List","]","`",")",":","The","edges","about","data","queue","schema",",","such","as",":","{","0",":","{","'data","'",":","[","(","a",",","ColumnType.SCALAR",")",",","(","b",",","ColumnType.SCALAR",")","]",",","'schema","'",":","{","'","a","'",",","SchemaRepr",",","'","b","'",",","SchemaRepr","}","}","1",":","{","'data","'",":","[","(","b",",","ColumnType.SCALAR",")",",","(","c",",","ColumnType.SCALAR",")","]",",","'schema","'",":","{","'","b","'",",","SchemaRepr",",","'","c","'",",","SchemaRepr","}","}","2",":","{","'data","'",":","[","(","a",",","ColumnType.SCALAR",")",",","(","c",",","ColumnType.SCALAR",")","]",",","'schema","'",":","{","'","a","'",",","SchemaRepr",",","'","c","'",",","SchemaRepr","}","}","}","dag_dict","(","`","Dict","`",")",":","The","dag","dict","."]
docstr: 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.
docstr_tok: ["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","."]
code: 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
  
imports: import types
  import uuid
  import json
  from copy import deepcopy
  from typing import Dict, Any, Set, List, Tuple, Optional
  from pydantic import BaseModel
  from towhee.runtime.check_utils import check_set, check_node_iter
  from towhee.runtime.node_repr import NodeRepr
  from towhee.runtime.schema_repr import SchemaRepr
  from towhee.runtime.node_config import TowheeConfig
  from towhee.runtime.constants import WindowAllConst, WindowConst, ConcatConst, MapConst, ReduceConst, FilterConst, TimeWindowConst, FlatMapConst, InputConst, OutputConst, OPType
label_desc: Use image node_id 4 for calling the DAGRepr obj's underlying member method code with example usage: obj.get_all_inputs(nodes, top_sort) and returns: all_inputs