def _fix_ipython_pylab():
    try:
        from IPython import get_ipython
    except ImportError:
        return
    shell = get_ipython()
    if shell is None:
        return

    from IPython.core.error import UsageError

    try:
        shell.enable_pylab('inline', import_all=True)
    except __HOLE__:
        # if the shell is a normal terminal shell, we get here
        pass
    except UsageError:
        pass
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/application.py/_fix_ipython_pylab