def show_selection(self, ignore_exceptions: bool = False):
    """Renders the selection in IPython.

    This method is intended to visualize the selection object itself, and
    renders boxes around the selected nodes.

    This method should only be used when IPython is available.

    Args:
      ignore_exceptions: Whether to catch errors during rendering and show a
        fallback for those subtrees.
    """
    # Import selection_rendering here to avoid a circular import.
    from penzai.core._treescope_handlers import selection_rendering  # pylint: disable=import-outside-toplevel

    selection_rendering.display_selection_streaming(
        self, visible_selection=True, ignore_exceptions=ignore_exceptions
    )
Renders the selection in IPython.

    This method is intended to visualize the selection object itself, and
    renders boxes around the selected nodes.

    This method should only be used when IPython is available.

    Args:
      ignore_exceptions: Whether to catch errors during rendering and show a
        fallback for those subtrees.
    
penzai/core/selectors.py