def METHOD_NAME(self, subaddress, spend_key):
    print('Signing/verifing messages with ' + ('subaddress' if subaddress else 'standard address') + ' ' + ('spend key' if spend_key else 'view key'))
    messages = ['foo', '']
    if subaddress:
        address = []
        for i in range(2):
            res = self.wallet[i].create_account()
            if i == 0:
                account_index = res.account_index
            res = self.wallet[i].create_address(account_index = account_index)
            if i == 0:
                address_index = res.address_index
            address.append(res.address)
    else:
        address = [self.address[0], self.address[1]]
        account_index = 0
        address_index = 0
    for message in messages:
        res = self.wallet[0].sign(message, account_index = account_index, address_index = address_index, signature_type = 'spend' if spend_key else 'view')
        signature = res.signature
        for i in range(2):
            res = self.wallet[i].verify(message, address[0], signature)
            assert res.good
            assert not res.old
            assert res.version == 2
            assert res.signature_type == 'spend' if spend_key else 'view'
            res = self.wallet[i].verify('different', address[0], signature)
            assert not res.good
            res = self.wallet[i].verify(message, address[1], signature)
            assert not res.good
            res = self.wallet[i].verify(message, address[0], signature + 'x')
            assert not res.good
            res = self.wallet[i].verify(message, address[0], signature.replace('SigV2','SigV1'))
            assert not res.good