'Returns the country name for the given IP Address or FQDN.'

def country_name(self, query):

    enc_query = self._check_query(query, city_or_country=True)
    if self._country:
        if ipv4_re.match(query):
            return GeoIP_country_name_by_addr(self._country, enc_query)
        else:
            return GeoIP_country_name_by_name(self._country, enc_query)
    else:
        return self.city(query)['country_name']
