def string_to_country(self, value):
        try:
            return CountryContainer(value)
        except __HOLE__:
            raise ValidationError(
                self.error_messages['invalid_country'],
                code='invalid_country',
                params={'name': value}
            )
dataset/ETHPy150Open django-bmf/django-bmf/djangobmf/fields/country.py/CountryField.string_to_country