


import unittest

from transformers import FunnelConfig, FunnelTokenizer, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
							import torch

							from transformers import (
							    MODEL_FOR_PRETRAINING_MAPPING,
							    FunnelBaseModel,
							    FunnelForMaskedLM,
							    FunnelForMultipleChoice,
							    FunnelForPreTraining,
							    FunnelForQuestionAnswering,
							    FunnelForSequenceClassification,
							    FunnelForTokenClassification,
							    FunnelModel,
							)





class    lowerCAmelCase__				:






						"""simple docstring"""




						def __init__(   self				,							a_				,							a_=13				,							a_=7				,							a_=True				,							a_=True				,							a_=True				,							a_=True				,							a_=99				,							a_=[1, 1, 2]				,							a_=1				,							a_=32				,							a_=4				,							a_=8				,							a_=37				,							a_="gelu_new"				,							a_=0.1				,							a_=0.1				,							a_=0.0				,							a_=512				,							a_=3				,							a_=0.02				,							a_=3				,							a_=4				,							a_=None				,							a_=False				,							):
							lowerCamelCase_			:							Tuple      =       parent
							lowerCamelCase_			:							List[str]      =       batch_size
							lowerCamelCase_			:							Any      =       seq_length
							lowerCamelCase_			:							Union[str, Any]      =       is_training
							lowerCamelCase_			:							str      =       use_input_mask
							lowerCamelCase_			:							int      =       use_token_type_ids
							lowerCamelCase_			:							Optional[int]      =       use_labels
							lowerCamelCase_			:							Optional[Any]      =       vocab_size
							lowerCamelCase_			:							List[Any]      =       block_sizes
							lowerCamelCase_			:							Optional[Any]      =       num_decoder_layers
							lowerCamelCase_			:							Optional[Any]      =       d_model
							lowerCamelCase_			:							Optional[Any]      =       n_head
							lowerCamelCase_			:							Union[str, Any]      =       d_head
							lowerCamelCase_			:							Optional[Any]      =       d_inner
							lowerCamelCase_			:							Union[str, Any]      =       hidden_act
							lowerCamelCase_			:							Any      =       hidden_dropout
							lowerCamelCase_			:							Optional[Any]      =       attention_dropout
							lowerCamelCase_			:							str      =       activation_dropout
							lowerCamelCase_			:							List[Any]      =       max_position_embeddings
							lowerCamelCase_			:							List[str]      =       type_vocab_size
							lowerCamelCase_			:							int      =       2
							lowerCamelCase_			:							str      =       num_labels
							lowerCamelCase_			:							Tuple      =       num_choices
							lowerCamelCase_			:							Optional[int]      =       scope
							lowerCamelCase_			:							Dict      =       initializer_std

							# Used in the tests to check the size of the first attention layer
							lowerCamelCase_			:							str      =       n_head
							# Used in the tests to check the size of the first hidden state
							lowerCamelCase_			:							Any      =       self.d_model
							# Used in the tests to check the number of output hidden states/attentions
							lowerCamelCase_			:							Optional[Any]      =       sum(self.block_sizes     ) + (0 if base else self.num_decoder_layers)
							# FunnelModel adds two hidden layers: input embeddings and the sum of the upsampled encoder hidden state with
							# the last hidden state of the first block (which is the first hidden state of the decoder).
							if not base:
								lowerCamelCase_			:							Any      =       self.num_hidden_layers + 2




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Tuple      =       ids_tensor([self.batch_size, self.seq_length]				,							self.vocab_size     )

							lowerCamelCase_			:							str      =       None
							if self.use_input_mask:
								lowerCamelCase_			:							Tuple      =       ids_tensor([self.batch_size, self.seq_length]				,							vocab_size=2     )

							lowerCamelCase_			:							Optional[Any]      =       None
							if self.use_token_type_ids:
								lowerCamelCase_			:							str      =       ids_tensor([self.batch_size, self.seq_length]				,							self.type_vocab_size     )

							lowerCamelCase_			:							Optional[Any]      =       None
							lowerCamelCase_			:							Any      =       None
							lowerCamelCase_			:							List[str]      =       None
							if self.use_labels:
								lowerCamelCase_			:							List[Any]      =       ids_tensor([self.batch_size]				,							self.type_sequence_label_size     )
								lowerCamelCase_			:							Dict      =       ids_tensor([self.batch_size, self.seq_length]				,							self.num_labels     )
								lowerCamelCase_			:							Union[str, Any]      =       ids_tensor([self.batch_size]				,							self.num_choices     )
								lowerCamelCase_			:							int      =       ids_tensor([self.batch_size, self.seq_length]				,							1     )

							lowerCamelCase_			:							int      =       self.get_config()

							return (
							    config,
							    input_ids,
							    token_type_ids,
							    input_mask,
							    sequence_labels,
							    token_labels,
							    choice_labels,
							    fake_token_labels,
							)




						def 					_UpperCamelCase			(   self     ):
							return FunnelConfig(
							    vocab_size=self.vocab_size				,							block_sizes=self.block_sizes				,							num_decoder_layers=self.num_decoder_layers				,							d_model=self.d_model				,							n_head=self.n_head				,							d_head=self.d_head				,							d_inner=self.d_inner				,							hidden_act=self.hidden_act				,							hidden_dropout=self.hidden_dropout				,							attention_dropout=self.attention_dropout				,							activation_dropout=self.activation_dropout				,							max_position_embeddings=self.max_position_embeddings				,							type_vocab_size=self.type_vocab_size				,							initializer_std=self.initializer_std				,							)




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							str      =       FunnelModel(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							str      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_     )
							lowerCamelCase_			:							Any      =       model(a_				,							token_type_ids=a_     )
							lowerCamelCase_			:							Optional[int]      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)     )

							lowerCamelCase_			:							Optional[Any]      =       False
							lowerCamelCase_			:							str      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)     )

							lowerCamelCase_			:							int      =       False
							lowerCamelCase_			:							int      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, self.seq_length, self.d_model)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							Any      =       FunnelBaseModel(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							Tuple      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_     )
							lowerCamelCase_			:							List[Any]      =       model(a_				,							token_type_ids=a_     )
							lowerCamelCase_			:							Any      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 2, self.d_model)     )

							lowerCamelCase_			:							Union[str, Any]      =       False
							lowerCamelCase_			:							Optional[int]      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 3, self.d_model)     )

							lowerCamelCase_			:							Optional[Any]      =       False
							lowerCamelCase_			:							List[str]      =       model(a_     )
							self.parent.assertEqual(result.last_hidden_state.shape				,							(self.batch_size, 2, self.d_model)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							Tuple      =       self.num_labels
							lowerCamelCase_			:							str      =       FunnelForPreTraining(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							int      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_				,							labels=a_     )
							self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							Union[str, Any]      =       FunnelForMaskedLM(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							Optional[int]      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_				,							labels=a_     )
							self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length, self.vocab_size)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							str      =       self.num_labels
							lowerCamelCase_			:							List[Any]      =       FunnelForSequenceClassification(a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							List[Any]      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_				,							labels=a_     )
							self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.num_labels)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							Dict      =       self.num_choices
							lowerCamelCase_			:							Union[str, Any]      =       FunnelForMultipleChoice(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							Any      =       input_ids.unsqueeze(1     ).expand(-1				,							self.num_choices				,							-1     ).contiguous()
							lowerCamelCase_			:							List[Any]      =       token_type_ids.unsqueeze(1     ).expand(-1				,							self.num_choices				,							-1     ).contiguous()
							lowerCamelCase_			:							Optional[int]      =       input_mask.unsqueeze(1     ).expand(-1				,							self.num_choices				,							-1     ).contiguous()
							lowerCamelCase_			:							Dict      =       model(
							    a_				,							attention_mask=a_				,							token_type_ids=a_				,							labels=a_				,							)
							self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.num_choices)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							Optional[int]      =       self.num_labels
							lowerCamelCase_			:							Union[str, Any]      =       FunnelForTokenClassification(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							int      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_				,							labels=a_     )
							self.parent.assertEqual(result.logits.shape				,							(self.batch_size, self.seq_length, self.num_labels)     )




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							a_				,							):
							lowerCamelCase_			:							str      =       FunnelForQuestionAnswering(config=a_     )
							model.to(a_     )
							model.eval()
							lowerCamelCase_			:							Optional[int]      =       model(
							    a_				,							attention_mask=a_				,							token_type_ids=a_				,							start_positions=a_				,							end_positions=a_				,							)
							self.parent.assertEqual(result.start_logits.shape				,							(self.batch_size, self.seq_length)     )
							self.parent.assertEqual(result.end_logits.shape				,							(self.batch_size, self.seq_length)     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Optional[int]      =       self.prepare_config_and_inputs()
							(
							    (
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,(
							    lowerCamelCase_
							)   ,
							)			:							Optional[int]      =       config_and_inputs
							lowerCamelCase_			:							str      =       {"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
							return config, inputs_dict





@require_torch
class    lowerCAmelCase__				(			__lowerCamelCase,    __lowerCamelCase,    unittest.TestCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	False
						__UpperCAmelCase   :		str  					=	False
						__UpperCAmelCase   :		Any  					=	(
						    (
						        FunnelModel,
						        FunnelForMaskedLM,
						        FunnelForPreTraining,
						        FunnelForQuestionAnswering,
						        FunnelForTokenClassification,
						    )
						    if is_torch_available()
						    else ()
						)
						__UpperCAmelCase   :		Optional[Any]  					=	(
						    {
						        '''feature-extraction''': (FunnelBaseModel, FunnelModel),
						        '''fill-mask''': FunnelForMaskedLM,
						        '''question-answering''': FunnelForQuestionAnswering,
						        '''text-classification''': FunnelForSequenceClassification,
						        '''token-classification''': FunnelForTokenClassification,
						        '''zero-shot''': FunnelForSequenceClassification,
						    }
						    if is_torch_available()
						    else {}
						)




						def 					_UpperCamelCase			(   self				,							a_				,							a_				,							a_=False     ):
							lowerCamelCase_			:							Union[str, Any]      =       super()._prepare_for_class(a_				,							a_				,							return_labels=a_     )

							if return_labels:
								if model_class in get_values(a_     ):
									lowerCamelCase_			:							Dict      =       torch.zeros(
									    (self.model_tester.batch_size, self.model_tester.seq_length)				,							dtype=torch.long				,							device=a_     )
							return inputs_dict




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							List[Any]      =       FunnelModelTester(self     )
							lowerCamelCase_			:							List[str]      =       ConfigTester(self				,							config_class=a_     )




						def 					_UpperCamelCase			(   self     ):
							self.config_tester.run_common_tests()




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Optional[Any]      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_model(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Dict      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_pretraining(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							List[str]      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_masked_lm(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Dict      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_token_classification(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							List[Any]      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_question_answering(*a_     )




						def 					_UpperCamelCase			(   self				,							a_     ):
							if hasattr(a_				,							"weight"     ) and module.weight is not None:
								module.weight.data.fill_(3     )
							if hasattr(a_				,							"bias"     ) and module.bias is not None:
								module.bias.data.fill_(3     )

							for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
								if hasattr(a_				,							a_     ) and getattr(a_				,							a_     ) is not None:
									lowerCamelCase_			:							List[Any]      =       getattr(a_				,							a_     )
									weight.data.fill_(3     )





@require_torch
class    lowerCAmelCase__				(			__lowerCamelCase,    unittest.TestCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	False
						__UpperCAmelCase   :		int  					=	False
						__UpperCAmelCase   :		Union[str, Any]  					=	(
						    (FunnelBaseModel, FunnelForMultipleChoice, FunnelForSequenceClassification) if is_torch_available() else ()
						)




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Optional[int]      =       FunnelModelTester(self				,							base=a_     )
							lowerCamelCase_			:							Optional[int]      =       ConfigTester(self				,							config_class=a_     )




						def 					_UpperCamelCase			(   self     ):
							self.config_tester.run_common_tests()




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Tuple      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_base_model(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							List[Any]      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_sequence_classification(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Any      =       self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_multiple_choice(*a_     )




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_   ,lowerCamelCase_			:							Union[str, Any]      =       self.model_tester.prepare_config_and_inputs_for_common()
							lowerCamelCase_			:							int      =       True

							for model_class in self.all_model_classes:
								if model_class.__name__ == "FunnelBaseModel":
									continue
								lowerCamelCase_			:							Optional[int]      =       model_class(a_     )
								model.to(a_     )
								model.train()
								lowerCamelCase_			:							List[str]      =       self._prepare_for_class(a_				,							a_				,							return_labels=a_     )
								lowerCamelCase_			:							Optional[int]      =       model(**a_     ).loss
								loss.backward()




						def 					_UpperCamelCase			(   self				,							a_     ):
							if hasattr(a_				,							"weight"     ) and module.weight is not None:
								module.weight.data.fill_(3     )
							if hasattr(a_				,							"bias"     ) and module.bias is not None:
								module.bias.data.fill_(3     )

							for param in ["r_w_bias", "r_r_bias", "r_kernel", "r_s_bias", "seg_embed"]:
								if hasattr(a_				,							a_     ) and getattr(a_				,							a_     ) is not None:
									lowerCamelCase_			:							Any      =       getattr(a_				,							a_     )
									weight.data.fill_(3     )





@require_torch
@require_sentencepiece
@require_tokenizers
class    lowerCAmelCase__				(			unittest.TestCase       ):






						"""simple docstring"""




						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							Dict      =       13
							lowerCamelCase_			:							Tuple      =       7
							lowerCamelCase_			:							List[Any]      =       torch.arange(0				,							batch_size * sequence_length     ).long().reshape(a_				,							a_     )
							lowerCamelCase_			:							Dict      =       [0, 1, 2, 3, 4, 5, 6, 4, 1, 3, 5, 0, 1]
							lowerCamelCase_			:							Optional[Any]      =       torch.tensor([[2] + [0] * a + [1] * (sequence_length - a - 1) for a in lengths]     )

							lowerCamelCase_			:							List[str]      =       FunnelModel.from_pretrained("sgugger/funnel-random-tiny"     )
							lowerCamelCase_			:							Tuple      =       model(a_				,							token_type_ids=a_     )[0].abs()

							lowerCamelCase_			:							List[str]      =       torch.tensor(23_44.83_52     )
							lowerCamelCase_			:							List[Any]      =       torch.tensor(0.80_52     )
							self.assertTrue(torch.allclose(output.sum()				,							a_				,							atol=1E-4     )     )
							self.assertTrue(torch.allclose(output.mean()				,							a_				,							atol=1E-4     )     )

							lowerCamelCase_			:							Optional[Any]      =       torch.tensor([[1] * 7, [1] * 4 + [0] * 3] * 6 + [[0, 1, 1, 0, 0, 1, 1]]     )
							lowerCamelCase_			:							Optional[Any]      =       model(a_				,							attention_mask=a_				,							token_type_ids=a_     )[0].abs()

							lowerCamelCase_			:							Tuple      =       torch.tensor(23_43.84_25     )
							lowerCamelCase_			:							int      =       torch.tensor(0.80_49     )
							self.assertTrue(torch.allclose(output.sum()				,							a_				,							atol=1E-4     )     )
							self.assertTrue(torch.allclose(output.mean()				,							a_				,							atol=1E-4     )     )




						@slow
						def 					_UpperCamelCase			(   self     ):
							lowerCamelCase_			:							List[Any]      =       FunnelTokenizer.from_pretrained("huggingface/funnel-small"     )
							lowerCamelCase_			:							int      =       FunnelModel.from_pretrained("huggingface/funnel-small"     )
							lowerCamelCase_			:							Any      =       tokenizer("Hello! I am the Funnel Transformer model."				,							return_tensors="pt"     )
							lowerCamelCase_			:							Dict      =       model(**a_     )[0]

							lowerCamelCase_			:							Dict      =       torch.tensor(2_35.72_46     )
							lowerCamelCase_			:							List[str]      =       torch.tensor(0.02_56     )
							self.assertTrue(torch.allclose(output.sum()				,							a_				,							atol=1E-4     )     )
							self.assertTrue(torch.allclose(output.mean()				,							a_				,							atol=1E-4     )     )





from ..utils import DummyObject, requires_backends





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[str]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[int]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[int]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[str]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[int]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Optional[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[str]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Tuple  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Union[str, Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[Any]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Any  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		int  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		Dict  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		List[str]  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )





class    lowerCAmelCase__				(			metaclass=__lowerCamelCase       ):






						"""simple docstring"""
						__UpperCAmelCase   :		str  					=	['''tokenizers''']




						def __init__(   self				,							*a_				,							**a_     ):
							requires_backends(self				,							["tokenizers"]     )

