



"""simple docstring"""






from typing import List

import jiwer
import jiwer.transforms as tr
from packaging import version

import datasets
from datasets.config import PY_VERSION


if PY_VERSION < version.parse("3.8"):
		import importlib_metadata
else:
		import importlib.metadata as importlib_metadata


_lowercase			:			List[str]										=						""


if version.parse(importlib_metadata.version("jiwer")) < version.parse("2.3.0"):

		class 	__SCREAMING_SNAKE_CASE     (				tr.AbstractTransform       ):


							'''simple docstring'''





							def __init__(	self							:  List[Any],  lowerCamelCase							:  str = " "					)-> List[str]:
										lowerCamelCase__		:		List[str]		     =sentence_delimiter



							def 		snake_case	(	self							:  Any,  lowerCamelCase							:  str					)-> Optional[Any]:
										return list(lowerCamelCase					)




							def 		snake_case	(	self							:  Optional[Any],  lowerCamelCase							:  List[str]					)-> Tuple:
										lowerCamelCase__		:		Optional[int]		     =[]
										for sent_idx, sentence in enumerate(lowerCamelCase					):
													chars.extend(self.process_string(lowerCamelCase					)					)
													if self.sentence_delimiter is not None and self.sentence_delimiter != "" and sent_idx < len(lowerCamelCase					) - 1:
																chars.append(self.sentence_delimiter					)
										return chars





		_lowercase			:			Optional[int]										=						tr.Compose(
		    [tr.RemoveMultipleSpaces(), tr.Strip(), SentencesToListOfCharacters(SENTENCE_DELIMITER)]
		)
else:
		_lowercase			:			List[str]										=						tr.Compose(
		    [
		        tr.RemoveMultipleSpaces(),
		        tr.Strip(),
		        tr.ReduceToSingleSentence(SENTENCE_DELIMITER),
		        tr.ReduceToListOfListOfChars(),
		    ]
		)


_lowercase			:			Dict										=						"\\n@inproceedings{inproceedings,\n    author = {Morris, Andrew and Maier, Viktoria and Green, Phil},\n    year = {2004},\n    month = {01},\n    pages = {},\n    title = {From WER and RIL to MER and WIL: improved evaluation measures for connected speech recognition.}\n}\n"

_lowercase			:			List[Any]										=						"\\nCharacter error rate (CER) is a common metric of the performance of an automatic speech recognition system.\n\nCER is similar to Word Error Rate (WER), but operates on character instead of word. Please refer to docs of WER for further information.\n\nCharacter error rate can be computed as:\n\nCER = (S + D + I) / N = (S + D + I) / (S + D + C)\n\nwhere\n\nS is the number of substitutions,\nD is the number of deletions,\nI is the number of insertions,\nC is the number of correct characters,\nN is the number of characters in the reference (N=S+D+C).\n\nCER's output is not always a number between 0 and 1, in particular when there is a high number of insertions. This value is often associated to the percentage of characters that were incorrectly predicted. The lower the value, the better the\nperformance of the ASR system with a CER of 0 being a perfect score.\n"

_lowercase			:			Dict										=						"\nComputes CER score of transcribed segments against references.\nArgs:\n    references: list of references for each speech input.\n    predictions: list of transcribtions to score.\n    concatenate_texts: Whether or not to concatenate sentences before evaluation, set to True for more accurate result.\nReturns:\n    (float): the character error rate\n\nExamples:\n\n    >>> predictions = [\"this is the prediction\", \"there is an other sample\"]\n    >>> references = [\"this is the reference\", \"there is another one\"]\n    >>> cer = datasets.load_metric(\"cer\")\n    >>> cer_score = cer.compute(predictions=predictions, references=references)\n    >>> print(cer_score)\n    0.34146341463414637\n"

@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION		,       _KWARGS_DESCRIPTION       )
class 	__SCREAMING_SNAKE_CASE     (				datasets.Metric       ):


					'''simple docstring'''





					def 		snake_case	(	self							:  Dict					)-> Optional[Any]:
								return datasets.MetricInfo(
								    description=_DESCRIPTION,  citation=_CITATION,  inputs_description=_KWARGS_DESCRIPTION,  features=datasets.Features(
								        {
								            '''predictions''': datasets.Value('''string''',  id='''sequence'''					),
								            '''references''': datasets.Value('''string''',  id='''sequence'''					),
								        }					),  codebase_urls=['''https://github.com/jitsi/jiwer/'''],  reference_urls=[
								        '''https://en.wikipedia.org/wiki/Word_error_rate''',
								        '''https://sites.google.com/site/textdigitisation/qualitymeasures/computingerrorrates''',
								    ],  )




					def 		snake_case	(	self							:  Optional[Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  List[str],  lowerCamelCase							:  Dict=False					)-> List[Any]:
								if concatenate_texts:
											return jiwer.compute_measures(
											    lowerCamelCase,  lowerCamelCase,  truth_transform=lowerCamelCase,  hypothesis_transform=lowerCamelCase,  )["wer"]

								lowerCamelCase__		:		Optional[Any]		     =0
								lowerCamelCase__		:		Union[str, Any]		     =0
								for prediction, reference in zip(lowerCamelCase,  lowerCamelCase					):
											lowerCamelCase__		:		int		     =jiwer.compute_measures(
											    lowerCamelCase,  lowerCamelCase,  truth_transform=lowerCamelCase,  hypothesis_transform=lowerCamelCase,  )
											incorrect += measures["substitutions"] + measures["deletions"] + measures["insertions"]
											total += measures["substitutions"] + measures["deletions"] + measures["hits"]

								return incorrect / total









"""simple docstring"""






from __future__ import annotations

import unittest

from transformers import FunnelConfig, is_tf_available
from transformers.testing_utils import require_tf

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


if is_tf_available():
		import tensorflow as tf

		from transformers import (
		    TFFunnelBaseModel,
		    TFFunnelForMaskedLM,
		    TFFunnelForMultipleChoice,
		    TFFunnelForPreTraining,
		    TFFunnelForQuestionAnswering,
		    TFFunnelForSequenceClassification,
		    TFFunnelForTokenClassification,
		    TFFunnelModel,
		)

class 	__SCREAMING_SNAKE_CASE     :


					'''simple docstring'''





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

								# Used in the tests to check the size of the first attention layer
								lowerCamelCase__		:		List[str]		     =n_head
								# Used in the tests to check the size of the first hidden state
								lowerCamelCase__		:		Tuple		     =self.d_model
								# Used in the tests to check the number of output hidden states/attentions
								lowerCamelCase__		:		List[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__		:		Union[str, Any]		     =self.num_hidden_layers + 2



					def 		snake_case	(	self							:  int					)-> List[Any]:
								lowerCamelCase__		:		Dict		     =ids_tensor([self.batch_size, self.seq_length],  self.vocab_size					)

								lowerCamelCase__		:		Union[str, Any]		     =None
								if self.use_input_mask:
											lowerCamelCase__		:		Any		     =random_attention_mask([self.batch_size, self.seq_length]					)

								lowerCamelCase__		:		int		     =None
								if self.use_token_type_ids:
											lowerCamelCase__		:		Union[str, Any]		     =ids_tensor([self.batch_size, self.seq_length],  self.type_vocab_size					)

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

								lowerCamelCase__		:		Optional[int]		     =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,  )

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



					def 		snake_case	(	self							:  List[Any],  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Optional[int],  lowerCamelCase							:  int,  lowerCamelCase							:  int,  lowerCamelCase							:  str,  lowerCamelCase							:  List[str],  lowerCamelCase							:  Dict,  )-> Union[str, Any]:
								lowerCamelCase__		:		Tuple		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		Dict		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Tuple		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Optional[Any]		     =[input_ids, input_mask]
								lowerCamelCase__		:		List[Any]		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Any		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)

								lowerCamelCase__		:		int		     =False
								lowerCamelCase__		:		Any		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)

								lowerCamelCase__		:		Dict		     =False
								lowerCamelCase__		:		Optional[int]		     =TFFunnelModel(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, self.seq_length, self.d_model)					)



					def 		snake_case	(	self							:  Tuple,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Tuple,  lowerCamelCase							:  Dict,  )-> Optional[Any]:
								lowerCamelCase__		:		List[str]		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Tuple		     =[input_ids, input_mask]
								lowerCamelCase__		:		Any		     =model(lowerCamelCase					)

								lowerCamelCase__		:		Optional[Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 2, self.d_model)					)

								lowerCamelCase__		:		List[Any]		     =False
								lowerCamelCase__		:		Dict		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		int		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 3, self.d_model)					)

								lowerCamelCase__		:		Union[str, Any]		     =False
								lowerCamelCase__		:		Optional[Any]		     =TFFunnelBaseModel(config=lowerCamelCase					)
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.last_hidden_state.shape,  (self.batch_size, 2, self.d_model)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Dict,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  List[Any],  )-> List[Any]:
								lowerCamelCase__		:		List[str]		     =TFFunnelForPreTraining(config=lowerCamelCase					)
								lowerCamelCase__		:		List[Any]		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Tuple,  lowerCamelCase							:  str,  lowerCamelCase							:  List[Any],  lowerCamelCase							:  List[Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Tuple,  lowerCamelCase							:  int,  )-> List[Any]:
								lowerCamelCase__		:		Union[str, Any]		     =TFFunnelForMaskedLM(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		List[Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.vocab_size)					)



					def 		snake_case	(	self							:  Optional[int],  lowerCamelCase							:  Tuple,  lowerCamelCase							:  Any,  lowerCamelCase							:  List[str],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[int],  lowerCamelCase							:  Dict,  )-> Union[str, Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.num_labels
								lowerCamelCase__		:		Tuple		     =TFFunnelForSequenceClassification(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		List[str]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_labels)					)



					def 		snake_case	(	self							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  int,  lowerCamelCase							:  Tuple,  )-> int:
								lowerCamelCase__		:		int		     =self.num_choices
								lowerCamelCase__		:		List[Any]		     =TFFunnelForMultipleChoice(config=lowerCamelCase					)
								lowerCamelCase__		:		int		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Union[str, Any]		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Optional[Any]		     =tf.tile(tf.expand_dims(lowerCamelCase,  1					),  (1, self.num_choices, 1)					)
								lowerCamelCase__		:		Union[str, Any]		     ={
								    '''input_ids''': multiple_choice_inputs_ids,
								    '''attention_mask''': multiple_choice_input_mask,
								    '''token_type_ids''': multiple_choice_token_type_ids,
								}
								lowerCamelCase__		:		str		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.num_choices)					)



					def 		snake_case	(	self							:  str,  lowerCamelCase							:  Dict,  lowerCamelCase							:  Optional[Any],  lowerCamelCase							:  Any,  lowerCamelCase							:  str,  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Dict,  )-> Optional[int]:
								lowerCamelCase__		:		Optional[Any]		     =self.num_labels
								lowerCamelCase__		:		Optional[Any]		     =TFFunnelForTokenClassification(config=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Union[str, Any]		     =model(lowerCamelCase					)
								self.parent.assertEqual(result.logits.shape,  (self.batch_size, self.seq_length, self.num_labels)					)



					def 		snake_case	(	self							:  Optional[int],  lowerCamelCase							:  Dict,  lowerCamelCase							:  str,  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  str,  lowerCamelCase							:  Optional[int],  )-> Tuple:
								lowerCamelCase__		:		Tuple		     =TFFunnelForQuestionAnswering(config=lowerCamelCase					)
								lowerCamelCase__		:		Union[str, Any]		     ={'''input_ids''': input_ids, '''attention_mask''': input_mask, '''token_type_ids''': token_type_ids}
								lowerCamelCase__		:		Optional[int]		     =model(lowerCamelCase					)
								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 		snake_case	(	self							:  int					)-> List[str]:
								lowerCamelCase__		:		List[Any]		     =self.prepare_config_and_inputs()
								(
								    (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       (
								    lowerCamelCase__
								)     ,       
								)		:		Tuple		     =config_and_inputs
								lowerCamelCase__		:		str		     ={'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
								return config, inputs_dict





@require_tf
class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_		,       lowerCAmelCase_		,       unittest.TestCase       ):


					'''simple docstring'''





					_a             =							(
					    (
					        TFFunnelModel,
					        TFFunnelForMaskedLM,
					        TFFunnelForPreTraining,
					        TFFunnelForQuestionAnswering,
					        TFFunnelForTokenClassification,
					    )
					    if is_tf_available()
					    else ()
					)
					_a             =							(
					    {
					        'feature-extraction': (TFFunnelBaseModel, TFFunnelModel),
					        'fill-mask': TFFunnelForMaskedLM,
					        'question-answering': TFFunnelForQuestionAnswering,
					        'text-classification': TFFunnelForSequenceClassification,
					        'token-classification': TFFunnelForTokenClassification,
					        'zero-shot': TFFunnelForSequenceClassification,
					    }
					    if is_tf_available()
					    else {}
					)
					_a             =							False
					_a             =							False



					def 		snake_case	(	self							:  str					)-> Tuple:
								lowerCamelCase__		:		Any		     =TFFunnelModelTester(self					)
								lowerCamelCase__		:		Any		     =ConfigTester(self,  config_class=lowerCamelCase					)



					def 		snake_case	(	self							:  List[str]					)-> Tuple:
								self.config_tester.run_common_tests()



					def 		snake_case	(	self							:  str					)-> List[Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_model(*lowerCamelCase					)



					def 		snake_case	(	self							:  str					)-> Dict:
								lowerCamelCase__		:		int		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_pretraining(*lowerCamelCase					)



					def 		snake_case	(	self							:  int					)-> List[Any]:
								lowerCamelCase__		:		Tuple		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_masked_lm(*lowerCamelCase					)



					def 		snake_case	(	self							:  Dict					)-> Any:
								lowerCamelCase__		:		str		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_token_classification(*lowerCamelCase					)




					def 		snake_case	(	self							:  Tuple					)-> Optional[Any]:
								lowerCamelCase__		:		Optional[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_question_answering(*lowerCamelCase					)





@require_tf
class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_		,       unittest.TestCase       ):


					'''simple docstring'''





					_a             =							(
					    (TFFunnelBaseModel, TFFunnelForMultipleChoice, TFFunnelForSequenceClassification) if is_tf_available() else ()
					)
					_a             =							False
					_a             =							False



					def 		snake_case	(	self							:  int					)-> Tuple:
								lowerCamelCase__		:		Union[str, Any]		     =TFFunnelModelTester(self,  base=lowerCamelCase					)
								lowerCamelCase__		:		Tuple		     =ConfigTester(self,  config_class=lowerCamelCase					)



					def 		snake_case	(	self							:  Any					)-> Any:
								self.config_tester.run_common_tests()



					def 		snake_case	(	self							:  Optional[Any]					)-> Optional[Any]:
								lowerCamelCase__		:		Any		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_base_model(*lowerCamelCase					)



					def 		snake_case	(	self							:  Union[str, Any]					)-> int:
								lowerCamelCase__		:		Tuple		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_sequence_classification(*lowerCamelCase					)




					def 		snake_case	(	self							:  List[str]					)-> Optional[int]:
								lowerCamelCase__		:		List[Any]		     =self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_for_multiple_choice(*lowerCamelCase					)




