def display_hook(value: Any) -> None:
    'Replacement sys.displayhook which prettifies objects with Rich.'
    if (value is not None):
        assert (console is not None)
        builtins._ = None
        console.print((value if isinstance(value, RichRenderable) else Pretty(value, overflow=overflow, indent_guides=indent_guides, max_length=max_length, max_string=max_string, expand_all=expand_all)), crop=crop)
        builtins._ = value
Replacement sys.displayhook which prettifies objects with Rich.
def display_hook(value: Any) -> None:
    
    if (value is not None):
        assert (console is not None)
        builtins._ = None
        console.print((value if isinstance(value, RichRenderable) else Pretty(value, overflow=overflow, indent_guides=indent_guides, max_length=max_length, max_string=max_string, expand_all=expand_all)), crop=crop)
        builtins._ = value