<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_country_by_name(self, country_name) -> 'Country': """ Gets a country in this coalition by its name Args: country_name: country name Returns: Country """

        VALID_STR.validate(country_name, 'get_country_by_name', exc=ValueError)
        if country_name not in self._countries_by_name.keys():
            for country in self.countries:

                if country.country_name == country_name:
                    return country
            raise ValueError(country_name)
        else:
            return self._countries_by_name[country_name]