src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py/XLMRobertaTokenizer/__setstate__
class XLMRobertaTokenizer:    def __setstate__(self, d):
        self.__dict__ = d

        # for backward compatibility
        if not hasattr(self, "sp_model_kwargs"):
            self.sp_model_kwargs = {}

        self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
        self.sp_model.LoadFromSerializedProto(self.sp_model_proto)