


from __future__ import annotations

import inspect
import unittest
from math import floor

import numpy as np

from transformers import CvtConfig
from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import cached_property, is_tf_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
   import tensorflow as tf

   from transformers import TFCvtForImageClassification, TFCvtModel
   from transformers.models.cvt.modeling_tf_cvt import TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
   from PIL import Image

   from transformers import AutoImageProcessor
class 	UpperCAmelCase_					(					UpperCamelCase    ):

   '''simple docstring'''




   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					int    =				self.config_class(**self.inputs_dict )
     self.parent.assertTrue(hasattr(__A						,				"embed_dim" ) )
     self.parent.assertTrue(hasattr(__A						,				"num_heads" ) )



class 	UpperCAmelCase_					:

   '''simple docstring'''




   def __init__(		self						,				__A						,				__A=13						,				__A=64						,				__A=3						,				__A=[16, 48, 96]						,				__A=[1, 3, 6]						,				__A=[1, 2, 10]						,				__A=[7, 3, 3]						,				__A=[4, 2, 2]						,				__A=[2, 1, 1]						,				__A=[2, 2, 2]						,				__A=[False, False, True]						,				__A=[0.0, 0.0, 0.0]						,				__A=0.02						,				__A=1e-12						,				__A=True						,				__A=True						,				__A=2						,				):






     """simple docstring"""





     lowerCamelCase :					Union[str, Any]    =				parent
     lowerCamelCase :					Union[str, Any]    =				batch_size
     lowerCamelCase :					Union[str, Any]    =				image_size
     lowerCamelCase :					List[str]    =				patch_sizes
     lowerCamelCase :					Tuple    =				patch_stride
     lowerCamelCase :					Dict    =				patch_padding
     lowerCamelCase :					Optional[int]    =				is_training
     lowerCamelCase :					Optional[Any]    =				use_labels
     lowerCamelCase :					Optional[Any]    =				num_labels
     lowerCamelCase :					List[str]    =				num_channels
     lowerCamelCase :					List[Any]    =				embed_dim
     lowerCamelCase :					int    =				num_heads
     lowerCamelCase :					List[Any]    =				stride_kv
     lowerCamelCase :					Dict    =				depth
     lowerCamelCase :					Any    =				cls_token
     lowerCamelCase :					List[Any]    =				attention_drop_rate
     lowerCamelCase :					Tuple    =				initializer_range
     lowerCamelCase :					Optional[int]    =				layer_norm_eps






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Any    =				floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

     lowerCamelCase :					Optional[int]    =				None
     if self.use_labels:
       # create a random int32 tensor of given shape
       lowerCamelCase :					Optional[int]    =				ids_tensor([self.batch_size]						,				self.num_labels )

     lowerCamelCase :					List[Any]    =				self.get_config()
     return config, pixel_values, labels






   def _snake_case    (		self ):






     """simple docstring"""





     return CvtConfig(
         image_size=self.image_size						,				num_labels=self.num_labels						,				num_channels=self.num_channels						,				embed_dim=self.embed_dim						,				num_heads=self.num_heads						,				patch_sizes=self.patch_sizes						,				patch_padding=self.patch_padding						,				patch_stride=self.patch_stride						,				stride_kv=self.stride_kv						,				depth=self.depth						,				cls_token=self.cls_token						,				attention_drop_rate=self.attention_drop_rate						,				initializer_range=self.initializer_range						,				)






   def _snake_case    (		self						,				__A						,				__A						,				__A ):






     """simple docstring"""





     lowerCamelCase :					Any    =				TFCvtModel(config=__A )
     lowerCamelCase :					Tuple    =				model(__A						,				training=__A )
     lowerCamelCase :					Optional[Any]    =				(self.image_size, self.image_size)
     lowerCamelCase    ,	lowerCamelCase :					Any    =				image_size[0], image_size[1]
     for i in range(len(self.depth ) ):
       lowerCamelCase :					Union[str, Any]    =				floor(((height + 2 * self.patch_padding[i] - self.patch_sizes[i]) / self.patch_stride[i]) + 1 )
       lowerCamelCase :					List[Any]    =				floor(((width + 2 * self.patch_padding[i] - self.patch_sizes[i]) / self.patch_stride[i]) + 1 )
     self.parent.assertEqual(result.last_hidden_state.shape						,				(self.batch_size, self.embed_dim[-1], height, width) )






   def _snake_case    (		self						,				__A						,				__A						,				__A ):






     """simple docstring"""





     lowerCamelCase :					List[Any]    =				self.num_labels
     lowerCamelCase :					Optional[int]    =				TFCvtForImageClassification(__A )
     lowerCamelCase :					Dict    =				model(__A						,				labels=__A						,				training=__A )
     self.parent.assertEqual(result.logits.shape						,				(self.batch_size, self.num_labels) )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Tuple    =				self.prepare_config_and_inputs()
     lowerCamelCase    ,	lowerCamelCase    ,	lowerCamelCase :					int    =				config_and_inputs
     lowerCamelCase :					Any    =				{"pixel_values": pixel_values}
     return config, inputs_dict



@require_tf
class 	UpperCAmelCase_					(					UpperCamelCase		, UpperCamelCase		, unittest.TestCase    ):

   '''simple docstring'''




   __A :      Dict     		=		(TFCvtModel, TFCvtForImageClassification) if is_tf_available() else ()
   __A :      Tuple     		=		(
       {"feature-extraction": TFCvtModel, "image-classification": TFCvtForImageClassification}
       if is_tf_available()
       else {}
   )
   __A :      List[str]     		=		False
   __A :      Tuple     		=		False
   __A :      Tuple     		=		False
   __A :      Union[str, Any]     		=		False
   __A :      Any     		=		False






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					List[str]    =				TFCvtModelTester(self )
     lowerCamelCase :					List[Any]    =				TFCvtConfigTester(self						,				config_class=__A						,				has_text_modality=__A						,				hidden_size=37 )






   def _snake_case    (		self ):






     """simple docstring"""





     self.config_tester.create_and_test_config_common_properties()
     self.config_tester.create_and_test_config_to_json_string()
     self.config_tester.create_and_test_config_to_json_file()
     self.config_tester.create_and_test_config_from_and_save_pretrained()
     self.config_tester.create_and_test_config_with_num_labels()
     self.config_tester.check_config_can_be_init_without_params()
     self.config_tester.check_config_arguments_init()






   @unittest.skip(reason="Cvt does not output attentions" )
   def _snake_case    (		self ):






     """simple docstring"""





     pass






   @unittest.skip(reason="Cvt does not use inputs_embeds" )
   def _snake_case    (		self ):






     """simple docstring"""





     pass






   @unittest.skip(reason="Cvt does not support input and output embeddings" )
   def _snake_case    (		self ):






     """simple docstring"""





     pass






   @unittest.skipIf(
       not is_tf_available() or len(tf.config.list_physical_devices("GPU" ) ) == 0						,				reason="TF does not support backprop for grouped convolutions on CPU."						,				)
   def _snake_case    (		self ):






     """simple docstring"""





     super().test_dataset_conversion()






   @unittest.skipIf(
       not is_tf_available() or len(tf.config.list_physical_devices("GPU" ) ) == 0						,				reason="TF does not support backprop for grouped convolutions on CPU."						,				)
   @slow
   def _snake_case    (		self ):






     """simple docstring"""





     super().test_keras_fit()






   @unittest.skip(reason="Get `Failed to determine best cudnn convolution algo.` error after using TF 2.12+cuda 11.8" )
   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Tuple    =				tf.keras.mixed_precision.Policy("mixed_float16" )
     tf.keras.mixed_precision.set_global_policy(__A )
     super().test_keras_fit()
     tf.keras.mixed_precision.set_global_policy("float32" )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase    ,	lowerCamelCase :					str    =				self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
       lowerCamelCase :					Any    =				model_class(__A )
       lowerCamelCase :					List[Any]    =				inspect.signature(model.call )
       # signature.parameters is an OrderedDict => so arg_names order is deterministic
       lowerCamelCase :					Optional[int]    =				[*signature.parameters.keys()]

       lowerCamelCase :					List[str]    =				["pixel_values"]
       self.assertListEqual(arg_names[:1]						,				__A )






   def _snake_case    (		self ):






     """simple docstring"""





     def check_hidden_states_output(__A						,				__A						,				__A ):
       lowerCamelCase :					List[Any]    =				model_class(__A )

       lowerCamelCase :					Tuple    =				model(**self._prepare_for_class(__A						,				__A ) )
       lowerCamelCase :					List[str]    =				outputs.hidden_states

       lowerCamelCase :					Dict    =				len(self.model_tester.depth )
       self.assertEqual(len(__A )						,				__A )

       # verify the first hidden states (first block)
       self.assertListEqual(
           list(hidden_states[0].shape[-3:] )						,				[
               self.model_tester.embed_dim[0],
               self.model_tester.image_size // 4,
               self.model_tester.image_size // 4,
           ]						,				)

     lowerCamelCase    ,	lowerCamelCase :					Dict    =				self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
       lowerCamelCase :					List[Any]    =				True
       check_hidden_states_output(__A						,				__A						,				__A )

       # check that output_hidden_states also work using config
       del inputs_dict["output_hidden_states"]
       lowerCamelCase :					Tuple    =				True

       check_hidden_states_output(__A						,				__A						,				__A )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					List[str]    =				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_model(*__A )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Optional[int]    =				self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_image_classification(*__A )






   @slow
   def _snake_case    (		self ):






     """simple docstring"""





     for model_name in TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
       lowerCamelCase :					str    =				TFCvtModel.from_pretrained(__A )
       self.assertIsNotNone(__A )






def 		lowercase_(  ):


  '''simple docstring'''

  lowerCamelCase :					Union[str, Any]    =				Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"	)
  return image







@require_tf
@require_vision
class 	UpperCAmelCase_					(					unittest.TestCase    ):

   '''simple docstring'''




   @cached_property
   def _snake_case    (		self ):






     """simple docstring"""





     return AutoImageProcessor.from_pretrained(TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST[0] )






   @slow
   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Dict    =				TFCvtForImageClassification.from_pretrained(TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST[0] )

     lowerCamelCase :					List[Any]    =				self.default_image_processor
     lowerCamelCase :					str    =				prepare_img()
     lowerCamelCase :					int    =				image_processor(images=__A						,				return_tensors="tf" )

     # forward pass
     lowerCamelCase :					Optional[int]    =				model(**__A )

     # verify the logits
     lowerCamelCase :					Optional[int]    =				tf.TensorShape((1, 1000) )
     self.assertEqual(outputs.logits.shape						,				__A )

     lowerCamelCase :					Any    =				tf.constant([0.9285, 0.9015, -0.3150] )
     self.assertTrue(np.allclose(outputs.logits[0, :3].numpy()						,				__A						,				atol=1e-4 ) )







import json
import os
import shutil
import tempfile
import unittest

import numpy as np
import pytest

from transformers import CLIPTokenizer, CLIPTokenizerFast
from transformers.models.clip.tokenization_clip import VOCAB_FILES_NAMES
from transformers.testing_utils import require_vision
from transformers.utils import IMAGE_PROCESSOR_NAME, is_vision_available


if is_vision_available():
   from PIL import Image

   from transformers import OwlViTImageProcessor, OwlViTProcessor
@require_vision
class 	UpperCAmelCase_					(					unittest.TestCase    ):

   '''simple docstring'''




   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					str    =				tempfile.mkdtemp()

     # fmt: off
     lowerCamelCase :					Any    =				["", "l", "o", "w", "e", "r", "s", "t", "i", "d", "n", "lo", "l</w>", "w</w>", "r</w>", "t</w>", "low</w>", "er</w>", "lowest</w>", "newer</w>", "wider", "<unk>", "<|startoftext|>", "<|endoftext|>"]
     # fmt: on
     lowerCamelCase :					List[Any]    =				dict(zip(__A						,				range(len(__A ) ) ) )
     lowerCamelCase :					List[Any]    =				["#version: 0.2", "l o", "lo w</w>", "e r</w>", ""]
     lowerCamelCase :					Optional[Any]    =				{"unk_token": "<unk>"}

     lowerCamelCase :					int    =				os.path.join(self.tmpdirname						,				VOCAB_FILES_NAMES["vocab_file"] )
     lowerCamelCase :					List[Any]    =				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(__A ) + "\n" )
     with open(self.merges_file						,				"w"						,				encoding="utf-8" ) as fp:
       fp.write("\n".join(__A ) )

     lowerCamelCase :					str    =				{
         "do_resize": True,
         "size": 20,
         "do_center_crop": True,
         "crop_size": 18,
         "do_normalize": True,
         "image_mean": [0.48145466, 0.4578275, 0.40821073],
         "image_std": [0.26862954, 0.26130258, 0.27577711],
     }
     lowerCamelCase :					str    =				os.path.join(self.tmpdirname						,				__A )
     with open(self.image_processor_file						,				"w"						,				encoding="utf-8" ) as fp:
       json.dump(__A						,				__A )






   def _snake_case    (		self						,				**__A ):






     """simple docstring"""





     return CLIPTokenizer.from_pretrained(self.tmpdirname						,				pad_token="!"						,				**__A )






   def _snake_case    (		self						,				**__A ):






     """simple docstring"""





     return CLIPTokenizerFast.from_pretrained(self.tmpdirname						,				pad_token="!"						,				**__A )






   def _snake_case    (		self						,				**__A ):






     """simple docstring"""





     return OwlViTImageProcessor.from_pretrained(self.tmpdirname						,				**__A )






   def _snake_case    (		self ):






     """simple docstring"""





     shutil.rmtree(self.tmpdirname )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Dict    =				[np.random.randint(255						,				size=(3, 30, 400)						,				dtype=np.uinta )]

     lowerCamelCase :					Tuple    =				[Image.fromarray(np.moveaxis(__A						,				0						,				-1 ) ) for x in image_inputs]

     return image_inputs






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					List[Any]    =				self.get_tokenizer()
     lowerCamelCase :					Optional[Any]    =				self.get_rust_tokenizer()
     lowerCamelCase :					Tuple    =				self.get_image_processor()

     lowerCamelCase :					List[Any]    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )
     processor_slow.save_pretrained(self.tmpdirname )
     lowerCamelCase :					Optional[Any]    =				OwlViTProcessor.from_pretrained(self.tmpdirname						,				use_fast=__A )

     lowerCamelCase :					Optional[int]    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )
     processor_fast.save_pretrained(self.tmpdirname )
     lowerCamelCase :					Tuple    =				OwlViTProcessor.from_pretrained(self.tmpdirname )

     self.assertEqual(processor_slow.tokenizer.get_vocab()						,				tokenizer_slow.get_vocab() )
     self.assertEqual(processor_fast.tokenizer.get_vocab()						,				tokenizer_fast.get_vocab() )
     self.assertEqual(tokenizer_slow.get_vocab()						,				tokenizer_fast.get_vocab() )
     self.assertIsInstance(processor_slow.tokenizer						,				__A )
     self.assertIsInstance(processor_fast.tokenizer						,				__A )

     self.assertEqual(processor_slow.image_processor.to_json_string()						,				image_processor.to_json_string() )
     self.assertEqual(processor_fast.image_processor.to_json_string()						,				image_processor.to_json_string() )
     self.assertIsInstance(processor_slow.image_processor						,				__A )
     self.assertIsInstance(processor_fast.image_processor						,				__A )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Optional[Any]    =				OwlViTProcessor(tokenizer=self.get_tokenizer()						,				image_processor=self.get_image_processor() )
     processor.save_pretrained(self.tmpdirname )

     lowerCamelCase :					int    =				self.get_tokenizer(bos_token="(BOS)"						,				eos_token="(EOS)" )
     lowerCamelCase :					List[str]    =				self.get_image_processor(do_normalize=__A )

     lowerCamelCase :					Optional[int]    =				OwlViTProcessor.from_pretrained(
         self.tmpdirname						,				bos_token="(BOS)"						,				eos_token="(EOS)"						,				do_normalize=__A )

     self.assertEqual(processor.tokenizer.get_vocab()						,				tokenizer_add_kwargs.get_vocab() )
     self.assertIsInstance(processor.tokenizer						,				__A )

     self.assertEqual(processor.image_processor.to_json_string()						,				image_processor_add_kwargs.to_json_string() )
     self.assertIsInstance(processor.image_processor						,				__A )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					List[Any]    =				self.get_image_processor()
     lowerCamelCase :					Optional[int]    =				self.get_tokenizer()

     lowerCamelCase :					Dict    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )

     lowerCamelCase :					Tuple    =				self.prepare_image_inputs()

     lowerCamelCase :					int    =				image_processor(__A						,				return_tensors="np" )
     lowerCamelCase :					Union[str, Any]    =				processor(images=__A						,				return_tensors="np" )

     for key in input_image_proc.keys():
       self.assertAlmostEqual(input_image_proc[key].sum()						,				input_processor[key].sum()						,				delta=1e-2 )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Union[str, Any]    =				self.get_image_processor()
     lowerCamelCase :					Dict    =				self.get_tokenizer()

     lowerCamelCase :					Union[str, Any]    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )

     lowerCamelCase :					Tuple    =				"lower newer"

     lowerCamelCase :					Union[str, Any]    =				processor(text=__A						,				return_tensors="np" )

     lowerCamelCase :					List[Any]    =				tokenizer(__A						,				return_tensors="np" )

     for key in encoded_tok.keys():
       self.assertListEqual(encoded_tok[key][0].tolist()						,				encoded_processor[key][0].tolist() )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Any    =				self.get_image_processor()
     lowerCamelCase :					Any    =				self.get_tokenizer()

     lowerCamelCase :					int    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )

     lowerCamelCase :					Optional[Any]    =				"lower newer"
     lowerCamelCase :					Dict    =				self.prepare_image_inputs()

     lowerCamelCase :					Any    =				processor(text=__A						,				images=__A )

     self.assertListEqual(list(inputs.keys() )						,				["input_ids", "attention_mask", "pixel_values"] )

     # test if it raises when no input is passed
     with pytest.raises(__A ):
       processor()






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Any    =				"google/owlvit-base-patch32"
     lowerCamelCase :					List[Any]    =				OwlViTProcessor.from_pretrained(__A )

     lowerCamelCase :					Tuple    =				["cat", "nasa badge"]
     lowerCamelCase :					str    =				processor(text=__A )

     lowerCamelCase :					Union[str, Any]    =				16
     self.assertListEqual(list(inputs.keys() )						,				["input_ids", "attention_mask"] )
     self.assertEqual(inputs["input_ids"].shape						,				(2, seq_length) )

     # test if it raises when no input is passed
     with pytest.raises(__A ):
       processor()






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					str    =				"google/owlvit-base-patch32"
     lowerCamelCase :					Optional[int]    =				OwlViTProcessor.from_pretrained(__A )

     lowerCamelCase :					Dict    =				[["cat", "nasa badge"], ["person"]]
     lowerCamelCase :					int    =				processor(text=__A )

     lowerCamelCase :					Tuple    =				16
     lowerCamelCase :					Any    =				len(__A )
     lowerCamelCase :					Optional[Any]    =				max([len(__A ) for texts in input_texts] )

     self.assertListEqual(list(inputs.keys() )						,				["input_ids", "attention_mask"] )
     self.assertEqual(inputs["input_ids"].shape						,				(batch_size * num_max_text_queries, seq_length) )

     # test if it raises when no input is passed
     with pytest.raises(__A ):
       processor()






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Dict    =				"google/owlvit-base-patch32"
     lowerCamelCase :					Tuple    =				OwlViTProcessor.from_pretrained(__A )

     lowerCamelCase :					List[Any]    =				["cat", "nasa badge"]
     lowerCamelCase :					Optional[Any]    =				processor(text=__A )

     lowerCamelCase :					int    =				16
     lowerCamelCase :					List[str]    =				inputs["input_ids"]
     lowerCamelCase :					int    =				[
         [4_9406, 2368, 4_9407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [4_9406, 6841, 1_1301, 4_9407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
     ]

     self.assertListEqual(list(inputs.keys() )						,				["input_ids", "attention_mask"] )
     self.assertEqual(inputs["input_ids"].shape						,				(2, seq_length) )
     self.assertListEqual(list(input_ids[0] )						,				predicted_ids[0] )
     self.assertListEqual(list(input_ids[1] )						,				predicted_ids[1] )






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Any    =				self.get_image_processor()
     lowerCamelCase :					List[str]    =				self.get_tokenizer()

     lowerCamelCase :					str    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )

     lowerCamelCase :					Dict    =				self.prepare_image_inputs()
     lowerCamelCase :					Union[str, Any]    =				self.prepare_image_inputs()

     lowerCamelCase :					Any    =				processor(images=__A						,				query_images=__A )

     self.assertListEqual(list(inputs.keys() )						,				["query_pixel_values", "pixel_values"] )

     # test if it raises when no input is passed
     with pytest.raises(__A ):
       processor()






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Optional[Any]    =				self.get_image_processor()
     lowerCamelCase :					Optional[int]    =				self.get_tokenizer()

     lowerCamelCase :					Dict    =				OwlViTProcessor(tokenizer=__A						,				image_processor=__A )

     lowerCamelCase :					Optional[int]    =				[[1, 4, 5, 8, 1, 0, 8], [3, 4, 3, 1, 1, 8, 9]]

     lowerCamelCase :					List[Any]    =				processor.batch_decode(__A )
     lowerCamelCase :					Union[str, Any]    =				tokenizer.batch_decode(__A )

     self.assertListEqual(__A						,				__A )



