


"""simple docstring"""
import unittest

from transformers import MobileBertConfig, 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, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
			import torch

			from transformers import (
			    MODEL_FOR_PRETRAINING_MAPPING,
			    MobileBertForMaskedLM,
			    MobileBertForMultipleChoice,
			    MobileBertForNextSentencePrediction,
			    MobileBertForPreTraining,
			    MobileBertForQuestionAnswering,
			    MobileBertForSequenceClassification,
			    MobileBertForTokenClassification,
			    MobileBertModel,
			)



class 			_UpperCAmelCase :






		'''simple docstring'''

		def __init__(self				,       a_				,       a_=13				,       a_=7				,       a_=True				,       a_=True				,       a_=True				,       a_=True				,       a_=99				,       a_=64				,       a_=32				,       a_=5				,       a_=4				,       a_=37				,       a_="gelu"				,       a_=0.1				,       a_=0.1				,       a_=5_12				,       a_=16				,       a_=2				,       a_=0.02				,       a_=3				,       a_=4				,       a_=None				,       ):





			'''simple docstring'''

			__snake_case	:						int						=				parent
			__snake_case	:						Optional[Any]						=				batch_size
			__snake_case	:						Dict						=				seq_length
			__snake_case	:						Any						=				is_training
			__snake_case	:						int						=				use_input_mask
			__snake_case	:						Union[str, Any]						=				use_token_type_ids
			__snake_case	:						List[Any]						=				use_labels
			__snake_case	:						List[Any]						=				vocab_size
			__snake_case	:						int						=				hidden_size
			__snake_case	:						str						=				embedding_size
			__snake_case	:						Dict						=				num_hidden_layers
			__snake_case	:						Dict						=				num_attention_heads
			__snake_case	:						Union[str, Any]						=				intermediate_size
			__snake_case	:						Optional[Any]						=				hidden_act
			__snake_case	:						Tuple						=				hidden_dropout_prob
			__snake_case	:						Union[str, Any]						=				attention_probs_dropout_prob
			__snake_case	:						Optional[Any]						=				max_position_embeddings
			__snake_case	:						List[str]						=				type_vocab_size
			__snake_case	:						Optional[int]						=				type_sequence_label_size
			__snake_case	:						Optional[Any]						=				initializer_range
			__snake_case	:						Any						=				num_labels
			__snake_case	:						Tuple						=				num_choices
			__snake_case	:						Optional[Any]						=				scope



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

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

			__snake_case	:						str						=				None
			if self.use_input_mask:
				__snake_case	:						Optional[int]						=				random_attention_mask([self.batch_size, self.seq_length]					)

			__snake_case	:						Tuple						=				None
			if self.use_token_type_ids:
				__snake_case	:						int						=				ids_tensor([self.batch_size, self.seq_length]				,       self.type_vocab_size					)

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

			__snake_case	:						int						=				self.get_config()

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



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			return MobileBertConfig(
			    vocab_size=self.vocab_size				,       hidden_size=self.hidden_size				,       num_hidden_layers=self.num_hidden_layers				,       num_attention_heads=self.num_attention_heads				,       intermediate_size=self.intermediate_size				,       embedding_size=self.embedding_size				,       hidden_act=self.hidden_act				,       hidden_dropout_prob=self.hidden_dropout_prob				,       attention_probs_dropout_prob=self.attention_probs_dropout_prob				,       max_position_embeddings=self.max_position_embeddings				,       type_vocab_size=self.type_vocab_size				,       is_decoder=a_				,       initializer_range=self.initializer_range				,       )



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						List[str]						=				MobileBertModel(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						str						=				model(a_				,       attention_mask=a_				,       token_type_ids=a_					)
			__snake_case	:						Any						=				model(a_				,       token_type_ids=a_					)
			__snake_case	:						Dict						=				model(a_					)

			self.parent.assertEqual(result.last_hidden_state.shape				,       (self.batch_size, self.seq_length, self.hidden_size)					)
			self.parent.assertEqual(result.pooler_output.shape				,       (self.batch_size, self.hidden_size)					)



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						Tuple						=				MobileBertForMaskedLM(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						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 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						str						=				MobileBertForNextSentencePrediction(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						Tuple						=				model(
			    a_				,       attention_mask=a_				,       token_type_ids=a_				,       labels=a_				,       )
			self.parent.assertEqual(result.logits.shape				,       (self.batch_size, 2)					)



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						List[Any]						=				MobileBertForPreTraining(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						Optional[Any]						=				model(
			    a_				,       attention_mask=a_				,       token_type_ids=a_				,       labels=a_				,       next_sentence_label=a_				,       )
			self.parent.assertEqual(result.prediction_logits.shape				,       (self.batch_size, self.seq_length, self.vocab_size)					)
			self.parent.assertEqual(result.seq_relationship_logits.shape				,       (self.batch_size, 2)					)



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						Tuple						=				MobileBertForQuestionAnswering(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						str						=				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 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						Optional[Any]						=				self.num_labels
			__snake_case	:						Tuple						=				MobileBertForSequenceClassification(a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						str						=				model(a_				,       attention_mask=a_				,       token_type_ids=a_				,       labels=a_					)
			self.parent.assertEqual(result.logits.shape				,       (self.batch_size, self.num_labels)					)



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

			__snake_case	:						str						=				self.num_labels
			__snake_case	:						str						=				MobileBertForTokenClassification(config=a_					)
			model.to(a_					)
			model.eval()
			__snake_case	:						List[str]						=				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 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_				,       a_					):





			'''simple docstring'''

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



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Dict						=				self.prepare_config_and_inputs()
			(
			    (
			    __snake_case
			)	,							(
			    __snake_case
			)	,							(
			    __snake_case
			)	,							(
			    __snake_case
			)	,							(
			    __snake_case
			)	,							(
			    __snake_case
			)	,							(
			    __snake_case
			)	,							
			)	:						int						=				config_and_inputs
			__snake_case	:						Union[str, Any]						=				{'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
			return config, inputs_dict



@require_torch
class 			_UpperCAmelCase (							lowercase_,				lowercase_,				unittest.TestCase				):






		'''simple docstring'''

		lowerCamelCase__				=(
		    (
		        MobileBertModel,
		        MobileBertForMaskedLM,
		        MobileBertForMultipleChoice,
		        MobileBertForNextSentencePrediction,
		        MobileBertForPreTraining,
		        MobileBertForQuestionAnswering,
		        MobileBertForSequenceClassification,
		        MobileBertForTokenClassification,
		    )
		    if is_torch_available()
		    else ()
		)
		lowerCamelCase__				=(
		    {
		        """feature-extraction""": MobileBertModel,
		        """fill-mask""": MobileBertForMaskedLM,
		        """question-answering""": MobileBertForQuestionAnswering,
		        """text-classification""": MobileBertForSequenceClassification,
		        """token-classification""": MobileBertForTokenClassification,
		        """zero-shot""": MobileBertForSequenceClassification,
		    }
		    if is_torch_available()
		    else {}
		)
		lowerCamelCase__				=True



		def 				SCREAMING_SNAKE_CASE  (self				,       a_				,       a_				,       a_=False					):





			'''simple docstring'''

			__snake_case	:						Any						=				super()._prepare_for_class(a_				,       a_				,       return_labels=a_					)

			if return_labels:
				if model_class in get_values(a_					):
					__snake_case	:						List[str]						=				torch.zeros(
					    (self.model_tester.batch_size, self.model_tester.seq_length)				,       dtype=torch.long				,       device=a_					)
					__snake_case	:						Tuple						=				torch.zeros(
					    self.model_tester.batch_size				,       dtype=torch.long				,       device=a_					)
			return inputs_dict



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						str						=				MobileBertModelTester(self					)
			__snake_case	:						str						=				ConfigTester(self				,       config_class=a_				,       hidden_size=37					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			self.config_tester.run_common_tests()



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Optional[int]						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_model(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Union[str, Any]						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_masked_lm(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Tuple						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_multiple_choice(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Optional[int]						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_next_sequence_prediction(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						str						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_pretraining(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Dict						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_question_answering(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						List[Any]						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_sequence_classification(*a_					)



		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Any						=				self.model_tester.prepare_config_and_inputs()
			self.model_tester.create_and_check_mobilebert_for_token_classification(*a_					)






def 		lowercase							(     _snake_case						:      Optional[Any]     )     ->Optional[int]:
	"""simple docstring"""





	return torch.tensor(
	    _snake_case     ,   dtype=torch.long     ,   device=_snake_case     ,   )


SCREAMING_SNAKE_CASE :    str									=				1E-3



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






		'''simple docstring'''

		@slow
		def 				SCREAMING_SNAKE_CASE  (self					):





			'''simple docstring'''

			__snake_case	:						Optional[int]						=				MobileBertModel.from_pretrained('''google/mobilebert-uncased'''					).to(a_					)
			__snake_case	:						Union[str, Any]						=				_long_tensor([[1_01, 71_10, 10_05, 10_56, 20_23, 1_13_33, 1_74_13, 10_29, 1_02]]					)
			with torch.no_grad():
				__snake_case	:						int						=				model(a_					)[0]
			__snake_case	:						Union[str, Any]						=				torch.Size((1, 9, 5_12)					)
			self.assertEqual(output.shape				,       a_					)
			__snake_case	:						Optional[Any]						=				torch.tensor(
			    [
			        [
			            [-2.4736526E07, 8.2691656E04, 1.6521838E05],
			            [-5.7541704E-01, 3.9056022E00, 4.4011507E00],
			            [2.6047359E00, 1.5677652E00, -1.7324188E-01],
			        ]
			    ]				,       device=a_				,       )

			# MobileBERT results range from 10e0 to 10e8. Even a 0.0000001% difference with a value of 10e8 results in a
			# ~1 difference, it's therefore not a good idea to measure using addition.
			# Here, we instead divide the expected result with the result in order to obtain ~1. We then check that the
			# result is held between bounds: 1 - TOLERANCE < expected_result / result < 1 + TOLERANCE
			__snake_case	:						int						=				torch.all((expected_slice / output[..., :3, :3]) >= 1 - TOLERANCE					)
			__snake_case	:						Optional[int]						=				torch.all((expected_slice / output[..., :3, :3]) <= 1 + TOLERANCE					)

			self.assertTrue(lower_bound and upper_bound					)









'''simple docstring'''

import os
import re
import warnings
from shutil import copyfile
from typing import List, Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
 from .tokenization_ta import TaTokenizer
else:
 lowerCamelCase							:   Any  						=	None


lowerCamelCase							:   Dict  						=	logging.get_logger(__name__)

lowerCamelCase							:   Optional[int]  						=	{'vocab_file': 'spiece.model', 'tokenizer_file': 'tokenizer.json'}

lowerCamelCase							:   List[str]  						=	{
    'vocab_file': {
        't5-small': 'https://huggingface.co/t5-small/resolve/main/spiece.model',
        't5-base': 'https://huggingface.co/t5-base/resolve/main/spiece.model',
        't5-large': 'https://huggingface.co/t5-large/resolve/main/spiece.model',
        't5-3b': 'https://huggingface.co/t5-3b/resolve/main/spiece.model',
        't5-11b': 'https://huggingface.co/t5-11b/resolve/main/spiece.model',
    },
    'tokenizer_file': {
        't5-small': 'https://huggingface.co/t5-small/resolve/main/tokenizer.json',
        't5-base': 'https://huggingface.co/t5-base/resolve/main/tokenizer.json',
        't5-large': 'https://huggingface.co/t5-large/resolve/main/tokenizer.json',
        't5-3b': 'https://huggingface.co/t5-3b/resolve/main/tokenizer.json',
        't5-11b': 'https://huggingface.co/t5-11b/resolve/main/tokenizer.json',
    },
}


# TODO(PVP) - this should be removed in Transformers v5
lowerCamelCase							:   Any  						=	{
    't5-small': 512,
    't5-base': 512,
    't5-large': 512,
    't5-3b': 512,
    't5-11b': 512,
}
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     List[str]  					=							VOCAB_FILES_NAMES
      lowerCAmelCase__					:     str  					=							PRETRAINED_VOCAB_FILES_MAP
      lowerCAmelCase__					:     Optional[Any]  					=							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      lowerCAmelCase__					:     int  					=							["""input_ids""", """attention_mask"""]
      lowerCAmelCase__					:     Optional[int]  					=							TaTokenizer

      lowerCAmelCase__					:     List[int]  					=							[]



      def __init__(self    :    Dict   ,						UpperCamelCase    :    str=None   ,						UpperCamelCase    :    Optional[Any]=None   ,						UpperCamelCase    :    Any="</s>"   ,						UpperCamelCase    :    str="<unk>"   ,						UpperCamelCase    :    List[str]="<pad>"   ,						UpperCamelCase    :    List[str]=100   ,						UpperCamelCase    :    Tuple=None   ,						**UpperCamelCase    :    List[str]   ,						):

             '''simple docstring'''







             if extra_ids > 0 and additional_special_tokens is None:
                    lowercase__      			= [f"<extra_id_{i}>" for i in range(UpperCamelCase )]
             elif extra_ids > 0 and additional_special_tokens is not None:
                    # Check that we have the right number of extra special tokens
                    lowercase__      			= len(set(filter(lambda UpperCamelCase : bool('''extra_id_''' in str(UpperCamelCase ) )   ,						UpperCamelCase ) ) )
                    if extra_tokens != extra_ids:
                           raise ValueError(
                               f"Both extra_ids ({extra_ids}) and additional_special_tokens ({additional_special_tokens}) are"
                               ''' provided to T5Tokenizer. In this case the additional_special_tokens must include the extra_ids'''
                               ''' tokens''' )

             super().__init__(
                 UpperCamelCase   ,						tokenizer_file=UpperCamelCase   ,						eos_token=UpperCamelCase   ,						unk_token=UpperCamelCase   ,						pad_token=UpperCamelCase   ,						extra_ids=UpperCamelCase   ,						additional_special_tokens=UpperCamelCase   ,						**UpperCamelCase   ,						)

             lowercase__      			= vocab_file
             lowercase__      			= False if not self.vocab_file else True
             lowercase__      			= extra_ids



      @staticmethod
      def       UpperCamelCase__		(UpperCamelCase    :    List[Any]   ,						UpperCamelCase    :    Union[str, Any]   ,						UpperCamelCase    :    Optional[Any] ):

             '''simple docstring'''







             if pretrained_model_name_or_path in TaTokenizerFast.max_model_input_sizes:
                    lowercase__      			= TaTokenizerFast.max_model_input_sizes[pretrained_model_name_or_path]
                    if init_max_model_length is not None and init_max_model_length != max_model_length:
                           return init_max_model_length
                    elif init_max_model_length is None:
                           warnings.warn(
                               '''This tokenizer was incorrectly instantiated with a model max length of'''
                               f" {deprecated_max_model_length} which will be corrected in Transformers v5.\nFor now, this"
                               ''' behavior is kept to avoid breaking backwards compatibility when padding/encoding with'''
                               ''' `truncation is True`.\n- Be aware that you SHOULD NOT rely on'''
                               f" {pretrained_model_name_or_path} automatically truncating your input to"
                               f" {deprecated_max_model_length} when padding/encoding.\n- If you want to encode/pad to sequences"
                               f" longer than {deprecated_max_model_length} you can either instantiate this tokenizer with"
                               ''' `model_max_length` or pass `max_length` when encoding/padding.\n- To avoid this warning, please'''
                               ''' instantiate this tokenizer with `model_max_length` set to your preferred value.'''   ,						UpperCamelCase   ,						)

             return max_model_length



      def       UpperCamelCase__		(self    :    Any   ,						UpperCamelCase    :    str   ,						UpperCamelCase    :    Optional[str] = None ):

             '''simple docstring'''







             if not self.can_save_slow_tokenizer:
                    raise ValueError(
                        '''Your fast tokenizer does not have the necessary information to save the vocabulary for a slow '''
                        '''tokenizer.''' )

             if not os.path.isdir(UpperCamelCase ):
                    logger.error(f"Vocabulary path ({save_directory}) should be a directory" )
                    return
             lowercase__      			= os.path.join(
                 UpperCamelCase   ,						(filename_prefix + '''-''' if filename_prefix else '''''') + VOCAB_FILES_NAMES['''vocab_file'''] )

             if os.path.abspath(self.vocab_file ) != os.path.abspath(UpperCamelCase ):
                    copyfile(self.vocab_file   ,						UpperCamelCase )
                    logger.info(f"Copy vocab file to {out_vocab_file}" )

             return (out_vocab_file,)



      def       UpperCamelCase__		(self    :    Any   ,						UpperCamelCase    :    List[int]   ,						UpperCamelCase    :    Optional[List[int]] = None ):

             '''simple docstring'''







             lowercase__      			= token_ids_a + [self.eos_token_id]
             if token_ids_a is None:
                    return self.prefix_tokens + token_ids_a
             else:
                    lowercase__      			= token_ids_a + [self.eos_token_id]
                    return self.prefix_tokens + token_ids_a + token_ids_a



      def       UpperCamelCase__		(self    :    Optional[Any]   ,						UpperCamelCase    :    List[int]   ,						UpperCamelCase    :    Optional[List[int]] = None ):

             '''simple docstring'''







             lowercase__      			= [self.eos_token_id]

             if token_ids_a is None:
                    return len(token_ids_a + eos ) * [0]
             return len(token_ids_a + eos + token_ids_a + eos ) * [0]



      def       UpperCamelCase__		(self    :    List[Any] ):

             '''simple docstring'''







             return list(
                 set(filter(lambda UpperCamelCase : bool(re.search(R'''<extra_id_\d+>'''   ,						UpperCamelCase ) ) is not None   ,						self.additional_special_tokens ) ) )






      def       UpperCamelCase__		(self    :    Union[str, Any] ):

             '''simple docstring'''







             return [self.convert_tokens_to_ids(UpperCamelCase ) for token in self.get_sentinel_tokens()]




