def ascii_text(text):
text = latinize_text(text, ascii=True)<EOL>if isinstance(text, six.text_type):<EOL><INDENT>text = text.encode('<STR_LIT:ascii>', '<STR_LIT:ignore>').decode('<STR_LIT:ascii>')<EOL><DEDENT>return text<EOL>
Transliterate the given text and make sure it ends up as ASCII.