


import itertools
import json
import os
import unittest

from transformers import AddedToken, RobertaTokenizer, RobertaTokenizerFast
from transformers.models.roberta.tokenization_roberta import VOCAB_FILES_NAMES
from transformers.testing_utils import require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin
@require_tokenizers
class  SCREAMING_SNAKE_CASE__  (				lowercase__						,    unittest.TestCase			):
      snake_case__				:     Optional[int]        =						RobertaTokenizer
      snake_case__				:     Tuple        =						RobertaTokenizerFast
      snake_case__				:     Dict        =						True
      snake_case__				:     Union[str, Any]        =						{'''cls_token''': '''<s>'''}
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			List[Any]:
             super().setUp()

             # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
             a_					:		Dict							=  [
                 'l',
                 'o',
                 'w',
                 'e',
                 'r',
                 's',
                 't',
                 'i',
                 'd',
                 'n',
                 '\u0120',
                 '\u0120l',
                 '\u0120n',
                 '\u0120lo',
                 '\u0120low',
                 'er',
                 '\u0120lowest',
                 '\u0120newer',
                 '\u0120wider',
                 '<unk>',
             ]
             a_					:		Any							=  dict(zip(SCREAMING_SNAKE_CASE__     ,							range(len(SCREAMING_SNAKE_CASE__     )     )     )     )
             a_					:		Dict							=  ['#version: 0.2', '\u0120 l', '\u0120l o', '\u0120lo w', 'e r', '']
             a_					:		Optional[int]							=  {'unk_token': '<unk>'}

             a_					:		Optional[int]							=  os.path.join(self.tmpdirname     ,							VOCAB_FILES_NAMES['vocab_file']     )
             a_					:		int							=  os.path.join(self.tmpdirname     ,							VOCAB_FILES_NAMES['merges_file']     )
             with open(self.vocab_file     ,							'w'     ,							encoding='utf-8'     ) as fp:
                    fp.write(json.dumps(SCREAMING_SNAKE_CASE__     ) + '\n'     )
             with open(self.merges_file     ,							'w'     ,							encoding='utf-8'     ) as fp:
                    fp.write('\n'.join(SCREAMING_SNAKE_CASE__     )     )
      def        SCREAMING_SNAKE_CASE							(       self				:       str     ,							**SCREAMING_SNAKE_CASE__				:       List[str]     )		->			Optional[Any]:
             kwargs.update(self.special_tokens_map     )
             return self.tokenizer_class.from_pretrained(self.tmpdirname     ,							**SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     ,							**SCREAMING_SNAKE_CASE__				:       Tuple     )		->			Optional[int]:
             kwargs.update(self.special_tokens_map     )
             return RobertaTokenizerFast.from_pretrained(self.tmpdirname     ,							**SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[int]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]     )		->			Any:
             a_					:		str							=  'lower newer'
             a_					:		Optional[int]							=  'lower newer'
             return input_text, output_text
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[int]     )		->			Tuple:
             a_					:		Tuple							=  self.tokenizer_class(self.vocab_file     ,							self.merges_file     ,							**self.special_tokens_map     )
             a_					:		List[Any]							=  'lower newer'
             a_					:		List[Any]							=  ['l', 'o', 'w', 'er', '\u0120', 'n', 'e', 'w', 'er']
             a_					:		Union[str, Any]							=  tokenizer.tokenize(SCREAMING_SNAKE_CASE__     )  # , add_prefix_space=True)
             self.assertListEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             a_					:		Dict							=  tokens + [tokenizer.unk_token]
             a_					:		int							=  [0, 1, 2, 1_5, 1_0, 9, 3, 2, 1_5, 1_9]
             self.assertListEqual(tokenizer.convert_tokens_to_ids(SCREAMING_SNAKE_CASE__     )     ,							SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Dict     )		->			Dict:
             a_					:		Tuple							=  self.get_tokenizer()

             self.assertListEqual(tokenizer.encode('Hello world!'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )     ,							[0, 3_1_4_1_4, 2_3_2, 3_2_8, 2]     )
             self.assertListEqual(
                 tokenizer.encode('Hello world! cécé herlolip 418'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )     ,							[0, 3_1_4_1_4, 2_3_2, 3_2_8, 7_4_0, 1_1_4_0, 1_2_6_9_5, 6_9, 4_6_0_7_8, 1_5_8_8, 2]     ,							)
      @slow
      def        SCREAMING_SNAKE_CASE							(       self				:       Dict     )		->			Optional[int]:
             a_					:		str							=  self.tokenizer_class.from_pretrained('roberta-base'     )

             a_					:		Optional[int]							=  tokenizer.encode('sequence builders'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
             a_					:		str							=  tokenizer.encode('multi-sequence build'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )

             a_					:		Any							=  tokenizer.encode(
                 'sequence builders'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     )
             a_					:		List[str]							=  tokenizer.encode(
                 'sequence builders'     ,							'multi-sequence build'     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     )

             a_					:		Tuple							=  tokenizer.build_inputs_with_special_tokens(SCREAMING_SNAKE_CASE__     )
             a_					:		int							=  tokenizer.build_inputs_with_special_tokens(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             assert encoded_sentence == encoded_text_from_decode
             assert encoded_pair == encoded_pair_from_decode
      def        SCREAMING_SNAKE_CASE							(       self				:       Any     )		->			str:
             a_					:		List[Any]							=  self.get_tokenizer()

             a_					:		List[Any]							=  'Encode this sequence.'
             a_					:		Tuple							=  tokenizer.byte_encoder[' '.encode('utf-8'     )[0]]

             # Testing encoder arguments
             a_					:		str							=  tokenizer.encode(SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     )
             a_					:		List[Any]							=  tokenizer.convert_ids_to_tokens(encoded[0]     )[0]
             self.assertNotEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             a_					:		Optional[Any]							=  tokenizer.encode(SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     )
             a_					:		Tuple							=  tokenizer.convert_ids_to_tokens(encoded[0]     )[0]
             self.assertEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             tokenizer.add_special_tokens({'bos_token': '<s>'}     )
             a_					:		str							=  tokenizer.encode(SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
             a_					:		Dict							=  tokenizer.convert_ids_to_tokens(encoded[1]     )[0]
             self.assertNotEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             # Testing spaces after special tokens
             a_					:		Dict							=  '<mask>'
             tokenizer.add_special_tokens(
                 {'mask_token': AddedToken(SCREAMING_SNAKE_CASE__     ,							lstrip=SCREAMING_SNAKE_CASE__     ,							rstrip=SCREAMING_SNAKE_CASE__     )}     )  # mask token has a left space
             a_					:		Tuple							=  tokenizer.convert_tokens_to_ids(SCREAMING_SNAKE_CASE__     )

             a_					:		Tuple							=  'Encode <mask> sequence'
             a_					:		Tuple							=  'Encode <mask>sequence'

             a_					:		Dict							=  tokenizer.encode(SCREAMING_SNAKE_CASE__     )
             a_					:		Tuple							=  encoded.index(SCREAMING_SNAKE_CASE__     )
             a_					:		Optional[Any]							=  tokenizer.convert_ids_to_tokens(encoded[mask_loc + 1]     )[0]
             self.assertEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )

             a_					:		str							=  tokenizer.encode(SCREAMING_SNAKE_CASE__     )
             a_					:		Optional[int]							=  encoded.index(SCREAMING_SNAKE_CASE__     )
             a_					:		Optional[int]							=  tokenizer.convert_ids_to_tokens(encoded[mask_loc + 1]     )[0]
             self.assertNotEqual(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       int     )		->			int:
             pass
      def        SCREAMING_SNAKE_CASE							(       self				:       Dict     )		->			int:
             for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
                    with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""     ):
                           a_					:		str							=  self.rust_tokenizer_class.from_pretrained(SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )
                           a_					:		Optional[Any]							=  self.tokenizer_class.from_pretrained(SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )
                           a_					:		Any							=  'A, <mask> AllenNLP sentence.'
                           a_					:		Dict							=  tokenizer_r.encode_plus(SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							return_token_type_ids=SCREAMING_SNAKE_CASE__     )
                           a_					:		Optional[int]							=  tokenizer_p.encode_plus(SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     ,							return_token_type_ids=SCREAMING_SNAKE_CASE__     )

                           # token_type_ids should put 0 everywhere
                           self.assertEqual(sum(tokens_r['token_type_ids']     )     ,							sum(tokens_p['token_type_ids']     )     )

                           # attention_mask should put 1 everywhere, so sum over length should be 1
                           self.assertEqual(
                               sum(tokens_r['attention_mask']     ) / len(tokens_r['attention_mask']     )     ,							sum(tokens_p['attention_mask']     ) / len(tokens_p['attention_mask']     )     ,							)

                           a_					:		Any							=  tokenizer_r.convert_ids_to_tokens(tokens_r['input_ids']     )
                           a_					:		int							=  tokenizer_p.convert_ids_to_tokens(tokens_p['input_ids']     )

                           # Rust correctly handles the space before the mask while python doesnt
                           self.assertSequenceEqual(tokens_p['input_ids']     ,							[0, 2_5_0, 6, 5_0_2_6_4, 3_8_2_3, 4_8_7, 2_1_9_9_2, 3_6_4_5, 4, 2]     )
                           self.assertSequenceEqual(tokens_r['input_ids']     ,							[0, 2_5_0, 6, 5_0_2_6_4, 3_8_2_3, 4_8_7, 2_1_9_9_2, 3_6_4_5, 4, 2]     )

                           self.assertSequenceEqual(
                               SCREAMING_SNAKE_CASE__     ,							['<s>', 'A', ',', '<mask>', 'ĠAllen', 'N', 'LP', 'Ġsentence', '.', '</s>']     )
                           self.assertSequenceEqual(
                               SCREAMING_SNAKE_CASE__     ,							['<s>', 'A', ',', '<mask>', 'ĠAllen', 'N', 'LP', 'Ġsentence', '.', '</s>']     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			str:
             for trim_offsets, add_prefix_space in itertools.product([True, False]     ,							repeat=2     ):
                    a_					:		int							=  self.rust_tokenizer_class.from_pretrained(
                        self.tmpdirname     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )

                    a_					:		Union[str, Any]							=  json.loads(tokenizer_r.backend_tokenizer.pre_tokenizer.__getstate__()     )
                    a_					:		Dict							=  json.loads(tokenizer_r.backend_tokenizer.post_processor.__getstate__()     )

                    self.assertEqual(pre_tokenizer_state['add_prefix_space']     ,							SCREAMING_SNAKE_CASE__     )

                    self.assertEqual(post_processor_state['add_prefix_space']     ,							SCREAMING_SNAKE_CASE__     )
                    self.assertEqual(post_processor_state['trim_offsets']     ,							SCREAMING_SNAKE_CASE__     )

      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			str:
             # Test which aims to verify that the offsets are well adapted to the argument `add_prefix_space` and
             # `trim_offsets`
             for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
                    with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""     ):
                           a_					:		int							=  'hello'  # `hello` is a token in the vocabulary of `pretrained_name`
                           a_					:		List[Any]							=  F"""{text_of_1_token} {text_of_1_token}"""

                           a_					:		Optional[Any]							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Union[str, Any]							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(len(SCREAMING_SNAKE_CASE__     ) + 1, len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		int							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Dict							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(len(SCREAMING_SNAKE_CASE__     ) + 1, len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		Dict							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Union[str, Any]							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(len(SCREAMING_SNAKE_CASE__     ), len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		Any							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Any							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(len(SCREAMING_SNAKE_CASE__     ), len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		Tuple							=  F""" {text}"""

                           # tokenizer_r = self.rust_tokenizer_class.from_pretrained(
                           #     pretrained_name, use_fast=True, add_prefix_space=True, trim_offsets=True
                           # )
                           # encoding = tokenizer_r(text, return_offsets_mapping=True, add_special_tokens=False)
                           # self.assertEqual(encoding.offset_mapping[0], (1, 1 + len(text_of_1_token)))
                           # self.assertEqual(
                           #     encoding.offset_mapping[1],
                           #     (1 + len(text_of_1_token) + 1, 1 + len(text_of_1_token) + 1 + len(text_of_1_token)),
                           # )

                           a_					:		List[Any]							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Optional[Any]							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(1, 1 + len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(1 + len(SCREAMING_SNAKE_CASE__     ) + 1, 1 + len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		Optional[int]							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		Any							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, 1 + len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(1 + len(SCREAMING_SNAKE_CASE__     ), 1 + len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)

                           a_					:		Dict							=  self.rust_tokenizer_class.from_pretrained(
                               SCREAMING_SNAKE_CASE__     ,							use_fast=SCREAMING_SNAKE_CASE__     ,							add_prefix_space=SCREAMING_SNAKE_CASE__     ,							trim_offsets=SCREAMING_SNAKE_CASE__     )
                           a_					:		List[Any]							=  tokenizer_r(SCREAMING_SNAKE_CASE__     ,							return_offsets_mapping=SCREAMING_SNAKE_CASE__     ,							add_special_tokens=SCREAMING_SNAKE_CASE__     )
                           self.assertEqual(encoding.offset_mapping[0]     ,							(0, 1 + len(SCREAMING_SNAKE_CASE__     ))     )
                           self.assertEqual(
                               encoding.offset_mapping[1]     ,							(1 + len(SCREAMING_SNAKE_CASE__     ), 1 + len(SCREAMING_SNAKE_CASE__     ) + 1 + len(SCREAMING_SNAKE_CASE__     ))     ,							)






import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
class  SCREAMING_SNAKE_CASE__  (				lowercase__			):
      snake_case__				:     Tuple        =						['''image_processor''', '''tokenizer''']
      snake_case__				:     Union[str, Any]        =						'''CLIPImageProcessor'''
      snake_case__				:     Dict        =						('''CLIPTokenizer''', '''CLIPTokenizerFast''')
      def __init__(       self				:       Optional[int]     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=None     ,							SCREAMING_SNAKE_CASE__				:       List[str]=None     ,							**SCREAMING_SNAKE_CASE__				:       int     )		->			Any:
             a_					:		List[Any]							=  None
             if "feature_extractor" in kwargs:
                    warnings.warn(
                        'The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'
                        ' instead.'     ,							SCREAMING_SNAKE_CASE__     ,							)
                    a_					:		Tuple							=  kwargs.pop('feature_extractor'     )

             a_					:		Tuple							=  image_processor if image_processor is not None else feature_extractor
             if image_processor is None:
                    raise ValueError('You need to specify an `image_processor`.'     )
             if tokenizer is None:
                    raise ValueError('You need to specify a `tokenizer`.'     )

             super().__init__(SCREAMING_SNAKE_CASE__     ,							SCREAMING_SNAKE_CASE__     )
      def __call__(       self				:       List[Any]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=None     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=None     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=None     ,							**SCREAMING_SNAKE_CASE__				:       str     )		->			Optional[Any]:

             if text is None and images is None:
                    raise ValueError('You have to specify either text or images. Both cannot be none.'     )

             if text is not None:
                    a_					:		List[str]							=  self.tokenizer(SCREAMING_SNAKE_CASE__     ,							return_tensors=SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )

             if images is not None:
                    a_					:		Dict							=  self.image_processor(SCREAMING_SNAKE_CASE__     ,							return_tensors=SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )

             if text is not None and images is not None:
                    a_					:		Dict							=  image_features.pixel_values
                    return encoding
             elif text is not None:
                    return encoding
             else:
                    return BatchEncoding(data=dict(**SCREAMING_SNAKE_CASE__     )     ,							tensor_type=SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Any     ,							*SCREAMING_SNAKE_CASE__				:       List[Any]     ,							**SCREAMING_SNAKE_CASE__				:       Optional[int]     )		->			List[Any]:
             return self.tokenizer.batch_decode(*SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[Any]     ,							*SCREAMING_SNAKE_CASE__				:       List[Any]     ,							**SCREAMING_SNAKE_CASE__				:       Dict     )		->			Optional[Any]:
             return self.tokenizer.decode(*SCREAMING_SNAKE_CASE__     ,							**SCREAMING_SNAKE_CASE__     )
      @property
      def        SCREAMING_SNAKE_CASE							(       self				:       List[Any]     )		->			Any:
             a_					:		str							=  self.tokenizer.model_input_names
             a_					:		Tuple							=  self.image_processor.model_input_names
             return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names     )     )
      @property
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			str:
             warnings.warn(
                 '`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'     ,							SCREAMING_SNAKE_CASE__     ,							)
             return self.image_processor_class

      @property
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			Tuple:
             warnings.warn(
                 '`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'     ,							SCREAMING_SNAKE_CASE__     ,							)
             return self.image_processor


