def akasLanguages(movie):
 lang_and_aka = []
 akas = set(((movie.get('akas') or []) + (movie.get('akas from release info') or [])))
 for aka in akas:
  aka = aka.encode('utf8').split('::')
  if (len(aka) == 2):
   language = _re_akas_lang.search(aka[1])
   if language:
    language = language.groups()[0]
   else:
    country = aka[1].split(',')[0]
    country = _re_akas_country.sub('', country).strip()
    language = COUNTRY_LANG.get(country)
  else:
   language = None
  lang_and_aka.append((language, aka[0].decode('utf8')))
 return lang_and_aka

def akasLanguages ( movie ) : lang_and_aka = [ ] akas = set ( ( ( movie . get ( 'akas' ) or [ ] ) + ( movie . get ( 'akas from release info' ) or [ ] ) ) ) for aka in akas : aka = aka . encode ( 'utf8' ) . split ( '::' ) if ( len ( aka ) == 2 ) : language = _re_akas_lang . search ( aka [ 1 ] ) if language : language = language . groups ( ) [ 0 ] else : country = aka [ 1 ] . split ( ',' ) [ 0 ] country = _re_akas_country . sub ( '' , country ) . strip ( ) language = COUNTRY_LANG . get ( country ) else : language = None lang_and_aka . append ( ( language , aka [ 0 ] . decode ( 'utf8' ) ) ) return lang_and_aka
given a movie .