def country_unalias(country):
 if (type(country) in [str, unicode]):
  return COUNTRY_ALIASES.get(country, country)
 if hasattr(country, '__iter__'):
  return [country_unalias(country_elt) for country_elt in country]
 return country

def country_unalias ( country ) : if ( type ( country ) in [ str , unicode ] ) : return COUNTRY_ALIASES . get ( country , country ) if hasattr ( country , '__iter__' ) : return [ country_unalias ( country_elt ) for country_elt in country ] return country
takes either a country code and returns either a country code or a list of country codes .