def _get_debugger():
    """
    Get a debugger for use in the debug wrapper. Factoring this out
    of the debug wrapper makes it a bit more pluggable, especially
    for tests.
    """
    try:
        import pudb
        return pudb
    except ImportError:
        print(
            'Using pudb not found, using pdb for post-mortem. Try pip install pudb.'
            )
        import pdb
        return pdb
