def sort_unicode(choices, key):
 if (not HAS_PYUCA):
  return sorted(choices, key=(lambda tup: remove_accents(key(tup)).lower()))
 else:
  collator = pyuca.Collator()
  return sorted(choices, key=(lambda tup: collator.sort_key(force_text(key(tup)))))

def sort_unicode ( choices , key ) : if ( not HAS_PYUCA ) : return sorted ( choices , key = ( lambda tup : remove_accents ( key ( tup ) ) . lower ( ) ) ) else : collator = pyuca . Collator ( ) return sorted ( choices , key = ( lambda tup : collator . sort_key ( force_text ( key ( tup ) ) ) ) )
unicode aware sorting if available .