def _add_countriesdata(cls, iso3, country):
        # type: (str, hxl.Row) -> None
        """
        Set up countries data from data in form provided by UNStats and World Bank

        Args:
            iso3 (str): ISO3 code for country
            country (hxl.Row): Country information

        Returns:
            None
        """
        countryname = country.get('#country+name+preferred')
        cls._countriesdata['countrynames2iso3'][countryname.upper()] = iso3
        iso2 = country.get('#country+code+v_iso2')
        if iso2:
            cls._countriesdata['iso2iso3'][iso2] = iso3
            # different types so keys won't clash
            cls._countriesdata['iso2iso3'][iso3] = iso2
        m49 = country.get('#country+code+num+v_m49')
        if m49:
            m49 = int(m49)
            cls._countriesdata['m49iso3'][m49] = iso3
            # different types so keys won't clash
            cls._countriesdata['m49iso3'][iso3] = m49
        cls._countriesdata['aliases'][iso3] = re.compile(country.get('#country+regex'), re.IGNORECASE)
        regionname = country.get('#region+main+name+preferred')
        sub_regionname = country.get('#region+sub+name+preferred')
        intermediate_regionname = country.get('#region+intermediate+name+preferred')
        regionid = country.get('#region+main+code')
        if regionid:
            regionid = int(regionid)
        sub_regionid = country.get('#region+sub+code')
        if sub_regionid:
            sub_regionid = int(sub_regionid)
        intermediate_regionid = country.get('#region+intermediate+code')
        if intermediate_regionid:
            intermediate_regionid = int(intermediate_regionid)

        # region, subregion and intermediate region codes do not clash so only need one dict
        def add_country_to_set(colname, idval, iso3):
            value = cls._countriesdata[colname].get(idval)
            if value is None:
                value = set()
                cls._countriesdata['regioncodes2countries'][idval] = value
            value.add(iso3)

        if regionname:
            add_country_to_set('regioncodes2countries', regionid, iso3)
            cls._countriesdata['regioncodes2names'][regionid] = regionname
            cls._countriesdata['regionnames2codes'][regionname.upper()] = regionid
        if sub_regionname:
            add_country_to_set('regioncodes2countries', sub_regionid, iso3)
            cls._countriesdata['regioncodes2names'][sub_regionid] = sub_regionname
            cls._countriesdata['regionnames2codes'][sub_regionname.upper()] = sub_regionid
        if intermediate_regionname:
            add_country_to_set('regioncodes2countries', intermediate_regionid, iso3)
            cls._countriesdata['regioncodes2names'][intermediate_regionid] = intermediate_regionname
            cls._countriesdata['regionnames2codes'][intermediate_regionname.upper()] = \
                intermediate_regionid
Set up countries data from data in form provided by UNStats and World Bank

        Args:
            iso3 (str): ISO3 code for country
            country (hxl.Row): Country information

        Returns:
            None