'Add a country field to a form description.
Arguments:
form_desc: A form description
Keyword Arguments:
required (bool): Whether this field is required; defaults to True'

def _add_country_field(self, form_desc, required=True):

    country_label = _(u'Country')
    error_msg = accounts.REQUIRED_FIELD_COUNTRY_MSG
    default_country = form_desc._field_overrides.get('country', {}).get('defaultValue')
    if default_country:
        form_desc.override_field_properties('country', default=default_country.upper())
    form_desc.add_field('country', label=country_label, field_type='select', options=list(countries), include_default_option=True, required=required, error_messages={'required': error_msg})
