def METHOD_NAME(msg):
    nonlocal attack_count
    # Make the inputs look like they are coming from Testnet paths until we reach the
    # signing phase.
    if attack_count > 0 and msg.tx.inputs and msg.tx.inputs[0] in (inp1, inp2):
        attack_count -= 1
        msg.tx.inputs[0].address_n[1] = H_(1)
    return msg