def remove_unsafe_chars(text):
if isinstance(text, six.string_types):<EOL><INDENT>text = UNSAFE_RE.sub('<STR_LIT>', text)<EOL><DEDENT>return text<EOL>
Remove unsafe unicode characters from a piece of text.