class_docstr: Manage the pipeline and runs it as a single instance.
  
  
  Args:
      dag_dict(`Dict`): The DAG Dictionary from the user pipeline.
      max_workers(`int`): The maximum number of threads.
class_docstr_tok: ["Manage","the","pipeline","and","runs","it","as","a","single","instance",".","Args",":","dag_dict","(","`","Dict","`",")",":","The","DAG","Dictionary","from","the","user","pipeline",".","max_workers","(","`","int","`",")",":","The","maximum","number","of","threads","."]
code: def _get_trace_nodes(self, include, exclude):
      def _find_match(patterns, x):
          return any(re.search(pattern, x) for pattern in patterns)
  
      include = [include] if isinstance(include, str) else include
      exclude = [exclude] if isinstance(exclude, str) else exclude
      include = (
          [
              node.name
              for node in self._dag_repr.nodes.values()
              if _find_match(include, node.name)
          ]
          if include
          else []
      )
      exclude = (
          [
              node.name
              for node in self._dag_repr.nodes.values()
              if _find_match(exclude, node.name)
          ]
          if exclude
          else []
      )
      trace_nodes = (
          list(set(include) - set(exclude))
          if include
          else list(
              set(node.name for node in self._dag_repr.nodes.values())
              - set(exclude)
          )
      )
  
      return trace_nodes
  
imports: import re
  from typing import Dict, Any, Union, Tuple, List
  from concurrent.futures import ThreadPoolExecutor
  from towhee.tools import visualizers
  from towhee.utils.log import engine_log
  from .operator_manager import OperatorPool
  from .data_queue import DataQueue
  from .dag_repr import DAGRepr
  from .nodes import create_node, NodeStatus
  from .node_repr import NodeRepr
  from .time_profiler import TimeProfiler, Event
label_desc: Use image node_id 9 for calling the RuntimePipeline obj's underlying member method code with example usage: obj._get_trace_nodes(include, exclude) and returns: trace_nodes, any