def in_ipynb() -> bool:
    """Check whether in iPython notebook or not."""
    try:
        return get_ipython().__class__.__name__ == "ZMQInteractiveShell"  # type: ignore
    except NameError:
        return False