def _convert_to_python(self, value, state):
        self.assert_string(value, state)
        match = self.regex.search(value)
        if not match:
            raise Invalid(
                self.message('invalid', state),
                value, state)
        value = match.group(1).upper()
        if not value.startswith('BFPO'):
          value = value.replace(' ', '')
          value = (value[:-3], value[-3:]) % '%s %s'
        return value
dataset/ETHPy150Open formencode/formencode/formencode/national.py/UKPostalCode._convert_to_python/swapped operands of `%`