


from __future__ import annotations

import unittest

from transformers import AutoTokenizer, PegasusConfig, is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow
from transformers.utils import cached_property

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


if is_tf_available():
   import tensorflow as tf

   from transformers import TFAutoModelForSeqaSeqLM, TFPegasusForConditionalGeneration, TFPegasusModel
@require_tf
class 	UpperCAmelCase_					:

   '''simple docstring'''




   __A :      str     		=		PegasusConfig
   __A :      Optional[Any]     		=		{}
   __A :      Union[str, Any]     		=		"gelu"






   def __init__(		self						,				__A						,				__A=13						,				__A=7						,				__A=True						,				__A=False						,				__A=99						,				__A=32						,				__A=2						,				__A=4						,				__A=37						,				__A=0.1						,				__A=0.1						,				__A=40						,				__A=2						,				__A=1						,				__A=0						,				):






     """simple docstring"""





     lowerCamelCase :					Any    =				parent
     lowerCamelCase :					List[str]    =				batch_size
     lowerCamelCase :					List[Any]    =				seq_length
     lowerCamelCase :					Any    =				is_training
     lowerCamelCase :					Optional[int]    =				use_labels
     lowerCamelCase :					Optional[int]    =				vocab_size
     lowerCamelCase :					Any    =				hidden_size
     lowerCamelCase :					List[Any]    =				num_hidden_layers
     lowerCamelCase :					Tuple    =				num_attention_heads
     lowerCamelCase :					Optional[int]    =				intermediate_size

     lowerCamelCase :					List[str]    =				hidden_dropout_prob
     lowerCamelCase :					str    =				attention_probs_dropout_prob
     lowerCamelCase :					Tuple    =				max_position_embeddings
     lowerCamelCase :					List[str]    =				eos_token_id
     lowerCamelCase :					Optional[int]    =				pad_token_id
     lowerCamelCase :					Tuple    =				bos_token_id






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Union[str, Any]    =				ids_tensor([self.batch_size, self.seq_length - 1]						,				self.vocab_size )
     lowerCamelCase :					Any    =				tf.expand_dims(tf.constant([self.eos_token_id] * self.batch_size )						,				1 )
     lowerCamelCase :					Optional[Any]    =				tf.concat([input_ids, eos_tensor]						,				axis=1 )

     lowerCamelCase :					List[Any]    =				ids_tensor([self.batch_size, self.seq_length]						,				self.vocab_size )

     lowerCamelCase :					int    =				self.config_cls(
         vocab_size=self.vocab_size						,				d_model=self.hidden_size						,				encoder_layers=self.num_hidden_layers						,				decoder_layers=self.num_hidden_layers						,				encoder_attention_heads=self.num_attention_heads						,				decoder_attention_heads=self.num_attention_heads						,				encoder_ffn_dim=self.intermediate_size						,				decoder_ffn_dim=self.intermediate_size						,				dropout=self.hidden_dropout_prob						,				attention_dropout=self.attention_probs_dropout_prob						,				max_position_embeddings=self.max_position_embeddings						,				eos_token_ids=[2]						,				bos_token_id=self.bos_token_id						,				pad_token_id=self.pad_token_id						,				decoder_start_token_id=self.pad_token_id						,				**self.config_updates						,				)
     lowerCamelCase :					str    =				prepare_pegasus_inputs_dict(__A						,				__A						,				__A )
     return config, inputs_dict






   def _snake_case    (		self						,				__A						,				__A ):






     """simple docstring"""





     lowerCamelCase :					Any    =				TFPegasusModel(config=__A ).get_decoder()
     lowerCamelCase :					Tuple    =				inputs_dict["input_ids"]

     lowerCamelCase :					Union[str, Any]    =				input_ids[:1, :]
     lowerCamelCase :					str    =				inputs_dict["attention_mask"][:1, :]
     lowerCamelCase :					Tuple    =				inputs_dict["head_mask"]
     lowerCamelCase :					str    =				1

     # first forward pass
     lowerCamelCase :					Optional[Any]    =				model(__A						,				attention_mask=__A						,				head_mask=__A						,				use_cache=__A )

     lowerCamelCase    ,	lowerCamelCase :					Union[str, Any]    =				outputs.to_tuple()

     # create hypothetical next token and extent to next_input_ids
     lowerCamelCase :					int    =				ids_tensor((self.batch_size, 3)						,				config.vocab_size )
     lowerCamelCase :					Optional[int]    =				tf.cast(ids_tensor((self.batch_size, 3)						,				2 )						,				tf.inta )

     # append to next input_ids and
     lowerCamelCase :					List[Any]    =				tf.concat([input_ids, next_tokens]						,				axis=-1 )
     lowerCamelCase :					List[str]    =				tf.concat([attention_mask, next_attn_mask]						,				axis=-1 )

     lowerCamelCase :					Any    =				model(__A						,				attention_mask=__A )[0]
     lowerCamelCase :					List[str]    =				model(__A						,				attention_mask=__A						,				past_key_values=__A )[0]

     self.parent.assertEqual(next_tokens.shape[1]						,				output_from_past.shape[1] )

     # select random slice
     lowerCamelCase :					Optional[Any]    =				int(ids_tensor((1,)						,				output_from_past.shape[-1] ) )
     lowerCamelCase :					Tuple    =				output_from_no_past[:, -3:, random_slice_idx]
     lowerCamelCase :					str    =				output_from_past[:, :, random_slice_idx]

     # test that outputs are equal for slice
     tf.debugging.assert_near(__A						,				__A						,				rtol=1e-3 )






def 		lowercase_(  SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_=None      ,						SCREAMING_SNAKE_CASE_=None      ,						SCREAMING_SNAKE_CASE_=None      ,						SCREAMING_SNAKE_CASE_=None      ,						SCREAMING_SNAKE_CASE_=None      ,						):


  '''simple docstring'''

  if attention_mask is None:
    lowerCamelCase :					Tuple    =				tf.cast(tf.math.not_equal(SCREAMING_SNAKE_CASE_      ,						config.pad_token_id	)      ,						tf.inta	)
  if decoder_attention_mask is None:
    lowerCamelCase :					str    =				tf.concat(
        [
            tf.ones(decoder_input_ids[:, :1].shape      ,						dtype=tf.inta	),
            tf.cast(tf.math.not_equal(decoder_input_ids[:, 1:]      ,						config.pad_token_id	)      ,						tf.inta	),
        ]      ,						axis=-1      ,						)
  if head_mask is None:
    lowerCamelCase :					List[str]    =				tf.ones((config.encoder_layers, config.encoder_attention_heads)	)
  if decoder_head_mask is None:
    lowerCamelCase :					List[str]    =				tf.ones((config.decoder_layers, config.decoder_attention_heads)	)
  if cross_attn_head_mask is None:
    lowerCamelCase :					Dict    =				tf.ones((config.decoder_layers, config.decoder_attention_heads)	)
  return {
      "input_ids": input_ids,
      "decoder_input_ids": decoder_input_ids,
      "attention_mask": attention_mask,
      "decoder_attention_mask": decoder_attention_mask,
      "head_mask": head_mask,
      "decoder_head_mask": decoder_head_mask,
      "cross_attn_head_mask": cross_attn_head_mask,
  }
@require_tf
class 	UpperCAmelCase_					(					UpperCamelCase		, UpperCamelCase		, unittest.TestCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		(TFPegasusForConditionalGeneration, TFPegasusModel) if is_tf_available() else ()
   __A :      Optional[int]     		=		(TFPegasusForConditionalGeneration,) if is_tf_available() else ()
   __A :      Any     		=		(
       {
           "conversational": TFPegasusForConditionalGeneration,
           "feature-extraction": TFPegasusModel,
           "summarization": TFPegasusForConditionalGeneration,
           "text2text-generation": TFPegasusForConditionalGeneration,
           "translation": TFPegasusForConditionalGeneration,
       }
       if is_tf_available()
       else {}
   )
   __A :      str     		=		True
   __A :      str     		=		False
   __A :      Optional[Any]     		=		False






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Any    =				TFPegasusModelTester(self )
     lowerCamelCase :					Union[str, Any]    =				ConfigTester(self						,				config_class=__A )






   def _snake_case    (		self ):






     """simple docstring"""





     self.config_tester.run_common_tests()






   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Optional[int]    =				self.model_tester.prepare_config_and_inputs_for_common()
     self.model_tester.check_decoder_model_past_large_inputs(*__A )



@require_sentencepiece
@require_tokenizers
@require_tf
class 	UpperCAmelCase_					(					unittest.TestCase    ):

   '''simple docstring'''




   __A :      List[str]     		=		[
       " PG&E stated it scheduled the blackouts in response to forecasts for high winds amid dry conditions. The aim is to reduce the risk of wildfires. Nearly 800 thousand customers were scheduled to be affected by the shutoffs which were expected to last through at least midday tomorrow.",
       " The London trio are up for best UK act and best album, as well as getting two nominations in the best song category.\"We got told like this morning 'Oh I think you're nominated'\", said Dappy.\"And I was like 'Oh yeah, which one?' And now we've got nominated for four awards. I mean, wow!\"Bandmate Fazer added: \"We thought it's best of us to come down and mingle with everyone and say hello to the cameras. And now we find we've got four nominations.\"The band have two shots at the best song prize, getting the nod for their Tynchy Stryder collaboration Number One, and single Strong Again.Their album Uncle B will also go up against records by the likes of Beyonce and Kanye West.N-Dubz picked up the best newcomer Mobo in 2007, but female member Tulisa said they wouldn't be too disappointed if they didn't win this time around.\"At the end of the day we're grateful to be where we are in our careers.\"If it don't happen then it don't happen - live to fight another day and keep on making albums and hits for the fans.\"Dappy also revealed they could be performing live several times on the night.The group will be doing Number One and also a possible rendition of the War Child single, I Got Soul.The charity song is a  re-working of The Killers' All These Things That I've Done and is set to feature artists like Chipmunk, Ironik and Pixie Lott.This year's Mobos will be held outside of London for the first time, in Glasgow on 30 September.N-Dubz said they were looking forward to performing for their Scottish fans and boasted about their recent shows north of the border.\"We just done Edinburgh the other day,\" said Dappy.\"We smashed up an N-Dubz show over there. We done Aberdeen about three or four months ago - we smashed up that show over there! Everywhere we go we smash it up!\" ",
   ]
   __A :      str     		=		[
       "California's largest electricity provider has cut power to hundreds of thousands of customers in an effort to"
       " reduce the risk of wildfires.",
       "N-Dubz have revealed they\'re \"grateful\" to have been nominated for four Mobo Awards.",
   ]  # differs slightly from pytorch, likely due to numerical differences in linear layers
   __A :      Optional[Any]     		=		"google/pegasus-xsum"






   @cached_property
   def _snake_case    (		self ):






     """simple docstring"""





     return AutoTokenizer.from_pretrained(self.model_name )






   @cached_property
   def _snake_case    (		self ):






     """simple docstring"""





     lowerCamelCase :					Optional[int]    =				TFAutoModelForSeqaSeqLM.from_pretrained(self.model_name )
     return model






   def _snake_case    (		self						,				**__A ):






     """simple docstring"""





     lowerCamelCase :					Dict    =				self.translate_src_text(**__A )
     assert self.expected_text == generated_words






   def _snake_case    (		self						,				**__A ):






     """simple docstring"""





     lowerCamelCase :					int    =				self.tokenizer(self.src_text						,				**__A						,				padding=__A						,				return_tensors="tf" )
     lowerCamelCase :					List[str]    =				self.model.generate(
         model_inputs.input_ids						,				attention_mask=model_inputs.attention_mask						,				num_beams=2						,				use_cache=__A						,				)
     lowerCamelCase :					List[Any]    =				self.tokenizer.batch_decode(generated_ids.numpy()						,				skip_special_tokens=__A )
     return generated_words






   @slow
   def _snake_case    (		self ):






     """simple docstring"""





     self._assert_generated_batch_equal_expected()







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 )



