def _in_notebook():
    """
    Returns True if the module is running in a Jupyter notebook, False if in IPython shell or other Python shell.
    """
    import sys
    return 'ipykernel' in sys.modules
