def METHOD_NAME(client: Client, pin: str, wipe_code: str):
    client.init_device()
    assert client.features.wipe_code_protection is True
    # Try to change the PIN to the current wipe code value. The operation should fail.
    with client, pytest.raises(TrezorFailure):
        client.use_pin_sequence([pin, wipe_code, wipe_code])
        br_amount = 5 if client.debug.model == "T" else 6
        client.set_expected_responses(
            [messages.ButtonRequest()] * br_amount
            + [messages.Failure(code=messages.FailureType.PinInvalid)]
        )
        device.change_pin(client)