remove a callback from the list of exception handlers for a coroutine

    :param handler: the callback to remove
    :type handler: function
    :param coro: the coroutine for which to remove the local handler
    :type coro: greenlet

    :returns: bool, whether the handler was found (and therefore removed)

def remove_local_exception_handler(handler, coro=None):
    """remove a callback from the list of exception handlers for a coroutine

    :param handler: the callback to remove
    :type handler: function
    :param coro: the coroutine for which to remove the local handler
    :type coro: greenlet

    :returns: bool, whether the handler was found (and therefore removed)
    """
    if coro is None:
        coro = compat.getcurrent()

    for i, cb in enumerate(state.local_exception_handlers.get(coro, [])):
        cb = cb()
        if cb is not None and cb is handler:
            state.local_exception_handlers[coro].pop(i)
            log.info("removing a coroutine local exception handler")
            return True
    return False