class_docstr: Utility class for quick manipulation of a connector pipeline.
docstr: Insert a new connector piece after an existing piece (by name or class).
  
  Args:
      name_or_class: Name or class of the connector piece after which `connector`
          will get inserted.
      connector: The new connector piece to be inserted.
  
  Returns:
      The ConnectorV2 after which `connector` has been inserted.
docstr_tok: ["Insert","a","new","connector","piece","after","an","existing","piece","(","by","name","or","class",")",".","Args",":","name_or_class",":","Name","or","class","of","the","connector","piece","after","which","`","connector","`","will","get","inserted",".","connector",":","The","new","connector","piece","to","be","inserted",".","Returns",":","The","ConnectorV2","after","which","`","connector","`","has","been","inserted","."]
code: def insert_after(
      self,
      name_or_class: Union[str, Type],
      connector: ConnectorV2,
  ) -> ConnectorV2:
      """Insert a new connector piece after an existing piece (by name or class).
  
      Args:
          name_or_class: Name or class of the connector piece after which `connector`
              will get inserted.
          connector: The new connector piece to be inserted.
  
      Returns:
          The ConnectorV2 after which `connector` has been inserted.
      """
      idx = -1
      for idx, c in enumerate(self.connectors):
          if (
              isinstance(name_or_class, str)
              and c.__class__.__name__ == name_or_class
          ) or (
              isinstance(name_or_class, type)
              and c.__class__ is name_or_class
          ):
              break
      if idx < 0:
          raise ValueError(
              f"Can not find connector with name or type '{name_or_class}'!"
          )
      prev_connector = self.connectors[idx]
  
      self.connectors.insert(idx + 1, connector)
      self._fix_input_output_types()
  
      logger.info(
          f"Inserted {connector.__class__.__name__} after {name_or_class} "
          f"to {self.__class__.__name__}."
      )
  
      return prev_connector
  
imports: from collections import defaultdict
  import logging
  from typing import Any, Dict, List, Optional, Type, Union
  from ray.rllib.connectors.connector_v2 import ConnectorV2
  from ray.rllib.core.rl_module.rl_module import RLModule
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.typing import EpisodeType
  from ray.util.annotations import PublicAPI
  from ray.util.timer import _Timer
label_desc: Use image node_id 5 for calling the ConnectorPipelineV2 obj's underlying member method code with example usage: obj.insert_after(name_or_class, connector) and returns: prev_connector