class_docstr: Components orchestration engine.
  
  Builds a graph of components and orchestrates their execution according to the execution graph.
class_docstr_tok: ["Components","orchestration","engine",".","Builds","a","graph","of","components","and","orchestrates","their","execution","according","to","the","execution","graph","."]
docstr: Given a component and an output socket name, return a list of Connections
  for which they represent the sender. Used to route output.
docstr_tok: ["Given","a","component","and","an","output","socket","name",",","return","a","list","of","Connections","for","which","they","represent","the","sender",".","Used","to","route","output","."]
code: def _collect_targets(
      self, component_name: str, socket_name: str
  ) -> List[Connection]:
      """
      Given a component and an output socket name, return a list of Connections
      for which they represent the sender. Used to route output.
      """
      return [
          connection
          for connection in self._connections
          if connection.sender == component_name
          and connection.sender_socket
          and connection.sender_socket.name == socket_name
      ]
  
imports: from typing import Optional, Any, Dict, List, Union, TypeVar, Type, Set
  import os
  import json
  import datetime
  import logging
  import importlib
  from pathlib import Path
  from copy import deepcopy
  from collections import defaultdict
  import networkx
  from haystack.core.component import component, Component, InputSocket, OutputSocket
  from haystack.core.errors import PipelineError, PipelineConnectError, PipelineMaxLoops, PipelineRuntimeError, PipelineValidationError
  from haystack.core.pipeline.descriptions import find_pipeline_outputs
  from haystack.core.pipeline.draw.draw import _draw, RenderingEngines
  from haystack.core.pipeline.validation import validate_pipeline_input, find_pipeline_inputs
  from haystack.core.component.connection import Connection, parse_connect_string
  from haystack.core.type_utils import _type_name
  from haystack.core.serialization import component_to_dict, component_from_dict
label_desc: Use image node_id 21 for calling the Pipeline obj's underlying member method code with example usage: obj._collect_targets(component_name, socket_name) and returns: unknown