import unittest

from transformers import EsmConfig, is_torch_available
from transformers.testing_utils import TestCasePlus, 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 EsmForMaskedLM, EsmForSequenceClassification, EsmForTokenClassification, EsmModel
					from transformers.models.esm.modeling_esm import (
					    ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
					    EsmEmbeddings,
					    create_position_ids_from_input_ids,
					)





class 					lowercase__						:


						def __init__(       self	:				int    ,		UpperCamelCase__	:				str    ,		UpperCamelCase__	:				Any=13    ,		UpperCamelCase__	:				List[str]=7    ,		UpperCamelCase__	:				Tuple=False    ,		UpperCamelCase__	:				str=True    ,		UpperCamelCase__	:				Tuple=False    ,		UpperCamelCase__	:				Optional[Any]=True    ,		UpperCamelCase__	:				Any=33    ,		UpperCamelCase__	:				Union[str, Any]=32    ,		UpperCamelCase__	:				int=5    ,		UpperCamelCase__	:				Optional[int]=4    ,		UpperCamelCase__	:				Optional[Any]=37    ,		UpperCamelCase__	:				List[str]="gelu"    ,		UpperCamelCase__	:				Any=0.1    ,		UpperCamelCase__	:				Tuple=0.1    ,		UpperCamelCase__	:				List[Any]=512    ,		UpperCamelCase__	:				Optional[Any]=16    ,		UpperCamelCase__	:				Dict=2    ,		UpperCamelCase__	:				List[str]=0.02    ,		UpperCamelCase__	:				Union[str, Any]=3    ,		UpperCamelCase__	:				Any=4    ,		UpperCamelCase__	:				Optional[Any]=None    ,		):





												'''simple docstring'''





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


						def        __A       (       self	:				List[str]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    int							=							ids_tensor([self.batch_size, self.seq_length]    ,		self.vocab_size						)

												SCREAMING_SNAKE_CASE							:    Dict							=							None
												if self.use_input_mask:
																		SCREAMING_SNAKE_CASE							:    Optional[Any]							=							random_attention_mask([self.batch_size, self.seq_length]						)

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

												SCREAMING_SNAKE_CASE							:    Dict							=							self.get_config()

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


						def        __A       (       self	:				str						):





												'''simple docstring'''





												return EsmConfig(
												    vocab_size=self.vocab_size    ,		hidden_size=self.hidden_size    ,		pad_token_id=1    ,		num_hidden_layers=self.num_hidden_layers    ,		num_attention_heads=self.num_attention_heads    ,		intermediate_size=self.intermediate_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    ,		initializer_range=self.initializer_range    ,		)


						def        __A       (       self	:				Optional[int]    ,		UpperCamelCase__	:				List[str]    ,		UpperCamelCase__	:				Union[str, Any]    ,		UpperCamelCase__	:				List[Any]    ,		UpperCamelCase__	:				int    ,		UpperCamelCase__	:				Union[str, Any]    ,		UpperCamelCase__	:				Any						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Any							=							EsmModel(config=UpperCamelCase__						)
												model.to(UpperCamelCase__						)
												model.eval()
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							model(UpperCamelCase__    ,		attention_mask=UpperCamelCase__						)
												SCREAMING_SNAKE_CASE							:    int							=							model(UpperCamelCase__						)
												SCREAMING_SNAKE_CASE							:    List[str]							=							model(UpperCamelCase__						)

												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        __A       (       self	:				List[str]    ,		UpperCamelCase__	:				Union[str, Any]    ,		UpperCamelCase__	:				int    ,		UpperCamelCase__	:				Union[str, Any]    ,		UpperCamelCase__	:				Dict    ,		UpperCamelCase__	:				List[Any]    ,		UpperCamelCase__	:				List[Any]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[str]							=							EsmForMaskedLM(config=UpperCamelCase__						)
												model.to(UpperCamelCase__						)
												model.eval()
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							model(UpperCamelCase__    ,		attention_mask=UpperCamelCase__    ,		labels=UpperCamelCase__						)
												self.parent.assertEqual(result.logits.shape    ,		(self.batch_size, self.seq_length, self.vocab_size)						)


						def        __A       (       self	:				Optional[int]    ,		UpperCamelCase__	:				Tuple    ,		UpperCamelCase__	:				Dict    ,		UpperCamelCase__	:				Union[str, Any]    ,		UpperCamelCase__	:				Optional[int]    ,		UpperCamelCase__	:				List[Any]    ,		UpperCamelCase__	:				Optional[Any]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							self.num_labels
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							EsmForTokenClassification(config=UpperCamelCase__						)
												model.to(UpperCamelCase__						)
												model.eval()
												SCREAMING_SNAKE_CASE							:    List[Any]							=							model(UpperCamelCase__    ,		attention_mask=UpperCamelCase__    ,		labels=UpperCamelCase__						)
												self.parent.assertEqual(result.logits.shape    ,		(self.batch_size, self.seq_length, self.num_labels)						)



						def        __A       (       self	:				Any						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Optional[int]							=							self.prepare_config_and_inputs()
												(
												    SCREAMING_SNAKE_CASE  
												)							:    Optional[int]							=							config_and_inputs
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							{'''input_ids''': input_ids, '''attention_mask''': input_mask}
												return config, inputs_dict






@require_torch
class 					lowercase__						(   __snake_case	,							__snake_case	,							unittest.TestCase):
						UpperCamelCase_     =		False

						UpperCamelCase_     =		(
						    (
						        EsmForMaskedLM,
						        EsmModel,
						        EsmForSequenceClassification,
						        EsmForTokenClassification,
						    )
						    if is_torch_available()
						    else ()
						)
						UpperCamelCase_     =		()
						UpperCamelCase_     =		(
						    {
						        """feature-extraction""": EsmModel,
						        """fill-mask""": EsmForMaskedLM,
						        """text-classification""": EsmForSequenceClassification,
						        """token-classification""": EsmForTokenClassification,
						        """zero-shot""": EsmForSequenceClassification,
						    }
						    if is_torch_available()
						    else {}
						)
						UpperCamelCase_     =		True


						def        __A       (       self	:				List[str]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Any							=							EsmModelTester(self						)
												SCREAMING_SNAKE_CASE							:    int							=							ConfigTester(self    ,		config_class=UpperCamelCase__    ,		hidden_size=37						)


						def        __A       (       self	:				int						):





												'''simple docstring'''





												self.config_tester.run_common_tests()


						def        __A       (       self	:				int						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[str]							=							self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_model(*UpperCamelCase__						)


						def        __A       (       self	:				Tuple						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Tuple							=							self.model_tester.prepare_config_and_inputs()
												for type in ["absolute", "relative_key", "relative_key_query"]:
																		SCREAMING_SNAKE_CASE							:    Optional[Any]							=							type
																		self.model_tester.create_and_check_model(*UpperCamelCase__						)


						def        __A       (       self	:				Tuple						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_masked_lm(*UpperCamelCase__						)


						def        __A       (       self	:				Optional[Any]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[Any]							=							self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_token_classification(*UpperCamelCase__						)


						@slow
						def        __A       (       self	:				List[str]						):





												'''simple docstring'''





												for model_name in ESM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																		SCREAMING_SNAKE_CASE							:    Any							=							EsmModel.from_pretrained(UpperCamelCase__						)
																		self.assertIsNotNone(UpperCamelCase__						)


						def        __A       (       self	:				List[str]						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[Any]							=							self.model_tester.prepare_config_and_inputs()[0]
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							EsmEmbeddings(config=UpperCamelCase__						)

												SCREAMING_SNAKE_CASE							:    Any							=							torch.as_tensor([[12, 31, 13, model.padding_idx]]						)
												SCREAMING_SNAKE_CASE							:    Any							=							torch.as_tensor(
												    [
												        [
												            0 + model.padding_idx + 1,
												            1 + model.padding_idx + 1,
												            2 + model.padding_idx + 1,
												            model.padding_idx,
												        ]
												    ]						)
												SCREAMING_SNAKE_CASE							:    int							=							create_position_ids_from_input_ids(UpperCamelCase__    ,		model.padding_idx						)
												self.assertEqual(position_ids.shape    ,		expected_positions.shape						)
												self.assertTrue(torch.all(torch.eq(UpperCamelCase__    ,		UpperCamelCase__						)						)						)


						def        __A       (       self	:				int						):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[Any]							=							self.model_tester.prepare_config_and_inputs()[0]
												SCREAMING_SNAKE_CASE							:    int							=							EsmEmbeddings(config=UpperCamelCase__						)

												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							torch.empty(2    ,		4    ,		30						)
												SCREAMING_SNAKE_CASE							:    Any							=							[
												    0 + embeddings.padding_idx + 1,
												    1 + embeddings.padding_idx + 1,
												    2 + embeddings.padding_idx + 1,
												    3 + embeddings.padding_idx + 1,
												]
												SCREAMING_SNAKE_CASE							:    Any							=							torch.as_tensor([expected_single_positions, expected_single_positions]						)
												SCREAMING_SNAKE_CASE							:    int							=							embeddings.create_position_ids_from_inputs_embeds(UpperCamelCase__						)
												self.assertEqual(position_ids.shape    ,		expected_positions.shape						)
												self.assertTrue(torch.all(torch.eq(UpperCamelCase__    ,		UpperCamelCase__						)						)						)


						@unittest.skip('''Esm does not support embedding resizing'''						)
						def        __A       (       self	:				str						):





												'''simple docstring'''





												pass


						@unittest.skip('''Esm does not support embedding resizing'''						)
						def        __A       (       self	:				Optional[int]						):





												'''simple docstring'''





												pass



						@unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.'''						)
						def        __A       (       self	:				Union[str, Any]						):





												'''simple docstring'''





												pass






@require_torch
class 					lowercase__						(   __snake_case):


						@slow
						def        __A       (       self	:				Optional[Any]						):





												'''simple docstring'''





												with torch.no_grad():
																		SCREAMING_SNAKE_CASE							:    List[str]							=							EsmForMaskedLM.from_pretrained('''facebook/esm2_t6_8M_UR50D'''						)
																		model.eval()
																		SCREAMING_SNAKE_CASE							:    List[Any]							=							torch.tensor([[0, 1, 2, 3, 4, 5]]						)
																		SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							model(UpperCamelCase__						)[0]

																		SCREAMING_SNAKE_CASE							:    Optional[Any]							=							33

																		SCREAMING_SNAKE_CASE							:    List[str]							=							torch.Size((1, 6, vocab_size)						)
																		self.assertEqual(output.shape    ,		UpperCamelCase__						)

																		SCREAMING_SNAKE_CASE							:    Tuple							=							torch.tensor(
																		    [[[8.9215, -10.5898, -6.4671], [-6.3967, -13.9114, -1.1212], [-7.7812, -13.9516, -3.7406]]]						)
																		self.assertTrue(torch.allclose(output[:, :3, :3]    ,		UpperCamelCase__    ,		atol=1E-4						)						)



						@slow
						def        __A       (       self	:				List[str]						):





												'''simple docstring'''





												with torch.no_grad():
																		SCREAMING_SNAKE_CASE							:    str							=							EsmModel.from_pretrained('''facebook/esm2_t6_8M_UR50D'''						)
																		model.eval()

																		SCREAMING_SNAKE_CASE							:    Any							=							torch.tensor([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]]						)
																		SCREAMING_SNAKE_CASE							:    int							=							model(UpperCamelCase__						)[0]
																		# compare the actual values for a slice.
																		SCREAMING_SNAKE_CASE							:    str							=							torch.tensor(
																		    [[[0.1444, 0.5413, 0.3248], [0.3034, 0.0053, 0.3108], [0.3228, -0.2499, 0.3415]]]						)
																		self.assertTrue(torch.allclose(output[:, :3, :3]    ,		UpperCamelCase__    ,		atol=1E-4						)						)







'''simple docstring'''




from typing import List, Optional, Union

import numpy as np
import torch
import torchaudio.compliance.kaldi as ta_kaldi

from ...feature_extraction_sequence_utils import SequenceFeatureExtractor
from ...feature_extraction_utils import BatchFeature
from ...utils import PaddingStrategy, TensorType, logging


lowercase			:				Optional[int]    		=			logging.get_logger(__name__)





class  A				(							__snake_case						):
     __magic_name__						=		['''input_features''', '''attention_mask''']





     def __init__(							self						,			SCREAMING_SNAKE_CASE=80						,			SCREAMING_SNAKE_CASE=16000						,			SCREAMING_SNAKE_CASE=80						,			SCREAMING_SNAKE_CASE=0.0						,			SCREAMING_SNAKE_CASE=True						,			SCREAMING_SNAKE_CASE=True						,			SCREAMING_SNAKE_CASE=True						,			**SCREAMING_SNAKE_CASE						,			) ->				int:






         """simple docstring"""






         super().__init__(feature_size=SCREAMING_SNAKE_CASE						,			sampling_rate=SCREAMING_SNAKE_CASE						,			padding_value=SCREAMING_SNAKE_CASE						,			**SCREAMING_SNAKE_CASE	)
         A       :   Optional[int]					=						num_mel_bins
         A       :   Tuple					=						do_ceptral_normalize
         A       :   Dict					=						normalize_means
         A       :   List[Any]					=						normalize_vars
         A       :   List[str]					=						True





     def 				__lowerCAmelCase							(							self						,			SCREAMING_SNAKE_CASE						,			) ->				np.ndarray:






         """simple docstring"""






         A       :   List[Any]					=						waveform * (2**15)  # Kaldi compliance: 16-bit signed integers
         A       :   Any					=						torch.from_numpy(SCREAMING_SNAKE_CASE	).unsqueeze(0	)
         A       :   Any					=						ta_kaldi.fbank(SCREAMING_SNAKE_CASE						,			num_mel_bins=self.num_mel_bins						,			sample_frequency=self.sampling_rate	)
         return features.numpy()





     @staticmethod
     def 				__lowerCAmelCase							(							SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE = True						,			SCREAMING_SNAKE_CASE = True						,			SCREAMING_SNAKE_CASE = 0.0						,			) ->				np.ndarray:






         """simple docstring"""






         if normalize_means:
             A       :   Dict					=						x[:input_length].mean(axis=0	)
             A       :   Optional[Any]					=						np.subtract(SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE	)
         if normalize_vars:
             A       :   str					=						x[:input_length].std(axis=0	)
             A       :   int					=						np.divide(SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE	)

         if input_length < x.shape[0]:
             A       :   List[str]					=						padding_value

         # make sure array is in float32
         A       :   Tuple					=						x.astype(np.floataa	)

         return x





     def 				__lowerCAmelCase							(							self						,			SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE = None	) ->				List[np.ndarray]:






         """simple docstring"""






         A       :   List[Any]					=						attention_mask.sum(-1	) if attention_mask is not None else [x.shape[0] for x in input_features]
         return [
             self.utterance_cmvn(SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE						,			self.normalize_means						,			self.normalize_vars						,			self.padding_value	)
             for x, n in zip(SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE	)
         ]





     def __call__(							self						,			SCREAMING_SNAKE_CASE						,			SCREAMING_SNAKE_CASE = False						,			SCREAMING_SNAKE_CASE = None						,			SCREAMING_SNAKE_CASE = False						,			SCREAMING_SNAKE_CASE = None						,			SCREAMING_SNAKE_CASE = None						,			SCREAMING_SNAKE_CASE = None						,			SCREAMING_SNAKE_CASE = None						,			**SCREAMING_SNAKE_CASE						,			) ->				BatchFeature:






         """simple docstring"""






         if sampling_rate is not None:
             if sampling_rate != self.sampling_rate:
                 raise ValueError(
                     F'The model corresponding to this feature extractor: {self} was trained using a sampling rate of'
                     F' {self.sampling_rate}. Please make sure that the provided `raw_speech` input was sampled with'
                     F' {self.sampling_rate} and not {sampling_rate}.'	)
         else:
             logger.warning(
                 '''It is strongly recommended to pass the `sampling_rate` argument to this function. '''
                 '''Failing to do so can result in silent errors that might be hard to debug.'''	)

         A       :   List[Any]					=						isinstance(SCREAMING_SNAKE_CASE						,			np.ndarray	) and len(raw_speech.shape	) > 1
         if is_batched_numpy and len(raw_speech.shape	) > 2:
             raise ValueError(F'Only mono-channel audio is supported for input to {self}'	)
         A       :   Tuple					=						is_batched_numpy or (
             isinstance(SCREAMING_SNAKE_CASE						,			(list, tuple)	) and (isinstance(raw_speech[0]						,			(np.ndarray, tuple, list)	))
         )

         if is_batched:
             A       :   Union[str, Any]					=						[np.asarray(SCREAMING_SNAKE_CASE						,			dtype=np.floataa	) for speech in raw_speech]
         elif not is_batched and not isinstance(SCREAMING_SNAKE_CASE						,			np.ndarray	):
             A       :   Union[str, Any]					=						np.asarray(SCREAMING_SNAKE_CASE						,			dtype=np.floataa	)
         elif isinstance(SCREAMING_SNAKE_CASE						,			np.ndarray	) and raw_speech.dtype is np.dtype(np.floataa	):
             A       :   Optional[int]					=						raw_speech.astype(np.floataa	)

         # always return batch
         if not is_batched:
             A       :   Any					=						[raw_speech]

         # extract fbank features
         A       :   List[str]					=						[self._extract_fbank_features(SCREAMING_SNAKE_CASE	) for waveform in raw_speech]

         # convert into correct format for padding
         A       :   str					=						BatchFeature({'''input_features''': features}	)

         A       :   Union[str, Any]					=						self.pad(
             SCREAMING_SNAKE_CASE						,			padding=SCREAMING_SNAKE_CASE						,			max_length=SCREAMING_SNAKE_CASE						,			truncation=SCREAMING_SNAKE_CASE						,			pad_to_multiple_of=SCREAMING_SNAKE_CASE						,			return_attention_mask=SCREAMING_SNAKE_CASE						,			**SCREAMING_SNAKE_CASE						,			)

         # make sure list is in array format
         A       :   List[str]					=						padded_inputs.get('''input_features'''	)
         if isinstance(input_features[0]						,			SCREAMING_SNAKE_CASE	):
             A       :   str					=						[np.asarray(SCREAMING_SNAKE_CASE						,			dtype=np.floataa	) for feature in input_features]

         A       :   Union[str, Any]					=						padded_inputs.get('''attention_mask'''	)
         if attention_mask is not None:
             A       :   Union[str, Any]					=						[np.asarray(SCREAMING_SNAKE_CASE						,			dtype=np.intaa	) for array in attention_mask]

         # Utterance-level cepstral mean and variance normalization
         if self.do_ceptral_normalize:
             A       :   Dict					=						(
                 np.array(SCREAMING_SNAKE_CASE						,			dtype=np.intaa	)
                 if self._get_padding_strategies(SCREAMING_SNAKE_CASE						,			max_length=SCREAMING_SNAKE_CASE	) is not PaddingStrategy.DO_NOT_PAD
                 else None
             )
             A       :   List[Any]					=						self.normalize(
                 padded_inputs['''input_features''']						,			attention_mask=SCREAMING_SNAKE_CASE	)

         if return_tensors is not None:
             A       :   int					=						padded_inputs.convert_to_tensors(SCREAMING_SNAKE_CASE	)

         return padded_inputs




