src/transformers/models/tapas/tokenization_tapas.py/filter_invalid_unicode
def filter_invalid_unicode(text):
    """Return an empty string and True if 'text' is in invalid unicode."""
    return ("", True) if isinstance(text, bytes) else (text, False)