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 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.
docstr_tok: ["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","."]
code: 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
  
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 5 for calling the DAGRepr obj's underlying member method code with example usage: obj.dfs_used_schema(nodes, name, ahead_edge) and returns: used_schema