async def METHOD_NAME(received_msg, keychain: Keychain) -> MoneroTransactionFinalAck:
    import gc
    from trezor import log, utils
    from trezor.wire.context import get_context
    from apps.monero.signing.state import State
    state = State()
    mods = utils.unimport_begin()
    progress = MoneroTransactionProgress()
    # Splitting ctx.call() to write() and read() helps to reduce memory fragmentation
    # between calls.
    while True:
        if __debug__:
            log.debug(__name__, "#### F: %s, A: %s", gc.mem_free(), gc.mem_alloc())
        gc.collect()
        gc.threshold(gc.mem_free() // 4 + gc.mem_alloc())
        result_msg, accept_msgs = await _sign_tx_dispatch(
            state, received_msg, keychain, progress
        )
        if accept_msgs is None:
            break
        ctx = get_context()
        await ctx.write(result_msg)
        del (result_msg, received_msg)
        utils.unimport_end(mods)
        received_msg = await ctx.read(accept_msgs)
    utils.unimport_end(mods)
    return result_msg