src/transformers/models/ernie_m/tokenization_ernie_m.py/ErnieMTokenizer/is_whitespace
class ErnieMTokenizer:    def is_whitespace(self, char):
        """
        is whitespace
        """
        if char == " " or char == "\t" or char == "\n" or char == "\r":
            return True
        if len(char) == 1:
            cat = unicodedata.category(char)
            if cat == "Zs":
                return True
        return False