def METHOD_NAME(client: "TrezorClient", n: "Address", transaction: dict) -> "MessageType":
    try:
        msg = create_sign_tx(transaction)
    except ValueError as e:
        raise exceptions.TrezorException("Failed to encode transaction") from e
    assert msg.transaction is not None
    msg.transaction.address_n = n
    return client.call(msg)