def insert_after(self, value: Any, and_select: bool = False) -> Any:
    """Inserts copies of ``value`` after each selected node.

    Args:
      value: Value to insert after each selected node.
      and_select: If True, selects the newly-inserted value for additional
        modification.

    Returns:
      If ``and_select`` is False, a copy of the original tree, but with
      ``value`` inserted after each selected node. If ``and_select`` is True, a
      new selection selecting the inserted nodes.

    Raises:
      ValueError: If any selected nodes are not children of a list or tuple.
    """
    if and_select:
      return _build_selection_from_boundary(
          self.apply_and_inline(
              lambda x: (x, _InProgressSelectionBoundary(value))
          )
      )
    return self.apply_and_inline(lambda x: (x, value))
Inserts copies of ``value`` after each selected node.

    Args:
      value: Value to insert after each selected node.
      and_select: If True, selects the newly-inserted value for additional
        modification.

    Returns:
      If ``and_select`` is False, a copy of the original tree, but with
      ``value`` inserted after each selected node. If ``and_select`` is True, a
      new selection selecting the inserted nodes.

    Raises:
      ValueError: If any selected nodes are not children of a list or tuple.
    
penzai/core/selectors.py