src/transformers/models/marian/tokenization_marian.py/MarianTokenizer/as_target_tokenizer
class MarianTokenizer:    def as_target_tokenizer(self):
        """
        Temporarily sets the tokenizer for encoding the targets. Useful for tokenizer associated to
        sequence-to-sequence models that need a slightly different processing for the labels.
        """
        self.current_spm = self.spm_target
        yield
        self.current_spm = self.spm_source