






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 						lowerCamelCase_				:







				def __init__(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase=1_3       ,					__lowerCAmelCase=7       ,					__lowerCAmelCase=True       ,					__lowerCAmelCase=True       ,					__lowerCAmelCase=True       ,					__lowerCAmelCase=True       ,					__lowerCAmelCase=9_9       ,					__lowerCAmelCase=6_4       ,					__lowerCAmelCase=3_2       ,					__lowerCAmelCase=5       ,					__lowerCAmelCase=4       ,					__lowerCAmelCase=3_7       ,					__lowerCAmelCase="gelu"       ,					__lowerCAmelCase=0.1       ,					__lowerCAmelCase=0.1       ,					__lowerCAmelCase=5_1_2       ,					__lowerCAmelCase=1_6       ,					__lowerCAmelCase=2       ,					__lowerCAmelCase=0.02       ,					__lowerCAmelCase=3       ,					__lowerCAmelCase=4       ,					__lowerCAmelCase=None       ,					):
								"""simple docstring"""
								__magic_name__		:Dict        =      parent
								__magic_name__		:Optional[int]        =      batch_size
								__magic_name__		:Dict        =      seq_length
								__magic_name__		:int        =      is_training
								__magic_name__		:List[str]        =      use_input_mask
								__magic_name__		:List[str]        =      use_token_type_ids
								__magic_name__		:Union[str, Any]        =      use_labels
								__magic_name__		:List[str]        =      vocab_size
								__magic_name__		:str        =      hidden_size
								__magic_name__		:Optional[Any]        =      embedding_size
								__magic_name__		:Optional[Any]        =      num_hidden_layers
								__magic_name__		:List[str]        =      num_attention_heads
								__magic_name__		:Union[str, Any]        =      intermediate_size
								__magic_name__		:Optional[Any]        =      hidden_act
								__magic_name__		:List[str]        =      hidden_dropout_prob
								__magic_name__		:Union[str, Any]        =      attention_probs_dropout_prob
								__magic_name__		:Optional[Any]        =      max_position_embeddings
								__magic_name__		:Union[str, Any]        =      type_vocab_size
								__magic_name__		:List[str]        =      type_sequence_label_size
								__magic_name__		:str        =      initializer_range
								__magic_name__		:int        =      num_labels
								__magic_name__		:int        =      num_choices
								__magic_name__		:Union[str, Any]        =      scope







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Union[str, Any]        =      ids_tensor([self.batch_size, self.seq_length]       ,					self.vocab_size     )

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

								__magic_name__		:List[Any]        =      None
								if self.use_token_type_ids:
												__magic_name__		:List[Any]        =      ids_tensor([self.batch_size, self.seq_length]       ,					self.type_vocab_size     )

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

								__magic_name__		:Optional[int]        =      self.get_config()

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







				def 			A	(						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=__lowerCAmelCase       ,					initializer_range=self.initializer_range       ,					)







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:List[str]        =      MobileBertModel(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:Optional[Any]        =      model(__lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase     )
								__magic_name__		:List[Any]        =      model(__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase     )
								__magic_name__		:Union[str, Any]        =      model(__lowerCAmelCase     )

								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       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      MobileBertForMaskedLM(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:List[Any]        =      model(__lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase     )
								self.parent.assertEqual(result.logits.shape       ,					(self.batch_size, self.seq_length, self.vocab_size)     )







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:List[str]        =      MobileBertForNextSentencePrediction(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:int        =      model(
								    __lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase       ,					)
								self.parent.assertEqual(result.logits.shape       ,					(self.batch_size, 2)     )







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      MobileBertForPreTraining(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:List[Any]        =      model(
								    __lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase       ,					next_sentence_label=__lowerCAmelCase       ,					)
								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 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      MobileBertForQuestionAnswering(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:int        =      model(
								    __lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					start_positions=__lowerCAmelCase       ,					end_positions=__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 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:Optional[Any]        =      self.num_labels
								__magic_name__		:List[Any]        =      MobileBertForSequenceClassification(__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:int        =      model(__lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase     )
								self.parent.assertEqual(result.logits.shape       ,					(self.batch_size, self.num_labels)     )







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:Optional[int]        =      self.num_labels
								__magic_name__		:Union[str, Any]        =      MobileBertForTokenClassification(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:List[Any]        =      model(__lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase     )
								self.parent.assertEqual(result.logits.shape       ,					(self.batch_size, self.seq_length, self.num_labels)     )







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase     ):
								"""simple docstring"""
								__magic_name__		:Tuple        =      self.num_choices
								__magic_name__		:Union[str, Any]        =      MobileBertForMultipleChoice(config=__lowerCAmelCase     )
								model.to(__lowerCAmelCase     )
								model.eval()
								__magic_name__		:List[Any]        =      input_ids.unsqueeze(1     ).expand(-1       ,					self.num_choices       ,					-1     ).contiguous()
								__magic_name__		:Any        =      token_type_ids.unsqueeze(1     ).expand(-1       ,					self.num_choices       ,					-1     ).contiguous()
								__magic_name__		:Optional[Any]        =      input_mask.unsqueeze(1     ).expand(-1       ,					self.num_choices       ,					-1     ).contiguous()
								__magic_name__		:Dict        =      model(
								    __lowerCAmelCase       ,					attention_mask=__lowerCAmelCase       ,					token_type_ids=__lowerCAmelCase       ,					labels=__lowerCAmelCase       ,					)
								self.parent.assertEqual(result.logits.shape       ,					(self.batch_size, self.num_choices)     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      self.prepare_config_and_inputs()
								(
								    (
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				(
								    __magic_name__
								)     ,				
								)		:str        =      config_and_inputs
								__magic_name__		: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 ):
				a__					       =  (
				    (
				        MobileBertModel,
				        MobileBertForMaskedLM,
				        MobileBertForMultipleChoice,
				        MobileBertForNextSentencePrediction,
				        MobileBertForPreTraining,
				        MobileBertForQuestionAnswering,
				        MobileBertForSequenceClassification,
				        MobileBertForTokenClassification,
				    )
				    if is_torch_available()
				    else ()
				)
				a__					       =  (
				    {
				        '''feature-extraction''': MobileBertModel,
				        '''fill-mask''': MobileBertForMaskedLM,
				        '''question-answering''': MobileBertForQuestionAnswering,
				        '''text-classification''': MobileBertForSequenceClassification,
				        '''token-classification''': MobileBertForTokenClassification,
				        '''zero-shot''': MobileBertForSequenceClassification,
				    }
				    if is_torch_available()
				    else {}
				)
				a__					       =  True







				def 			A	(						self       ,					__lowerCAmelCase       ,					__lowerCAmelCase       ,					__lowerCAmelCase=False     ):
								"""simple docstring"""
								__magic_name__		:Tuple        =      super()._prepare_for_class(__lowerCAmelCase       ,					__lowerCAmelCase       ,					return_labels=__lowerCAmelCase     )

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







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      MobileBertModelTester(self     )
								__magic_name__		:Tuple        =      ConfigTester(self       ,					config_class=__lowerCAmelCase       ,					hidden_size=3_7     )







				def 			A	(						self     ):
								"""simple docstring"""
								self.config_tester.run_common_tests()







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[str]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_model(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Optional[int]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_masked_lm(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Union[str, Any]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_multiple_choice(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Union[str, Any]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_next_sequence_prediction(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_pretraining(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_question_answering(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Optional[int]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_sequence_classification(*__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Optional[int]        =      self.model_tester.prepare_config_and_inputs()
								self.model_tester.create_and_check_mobilebert_for_token_classification(*__lowerCAmelCase     )







def      __lowercase					( snake_case ):







				"""simple docstring"""






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


SCREAMING_SNAKE_CASE__      :			List[str]							=		1e-3

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







				@slow
				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      MobileBertModel.from_pretrained('''google/mobilebert-uncased'''     ).to(__lowerCAmelCase     )
								__magic_name__		:List[Any]        =      _long_tensor([[1_0_1, 7_1_1_0, 1_0_0_5, 1_0_5_6, 2_0_2_3, 1_1_3_3_3, 1_7_4_1_3, 1_0_2_9, 1_0_2]]     )
								with torch.no_grad():
												__magic_name__		:List[Any]        =      model(__lowerCAmelCase     )[0]
								__magic_name__		:Any        =      torch.Size((1, 9, 5_1_2)     )
								self.assertEqual(output.shape       ,					__lowerCAmelCase     )
								__magic_name__		:Dict        =      torch.tensor(
								    [
								        [
								            [-2.473_6526E07, 8.269_1656E04, 1.652_1838E05],
								            [-5.754_1704E-01, 3.905_6022E00, 4.401_1507E00],
								            [2.604_7359E00, 1.567_7652E00, -1.732_4188E-01],
								        ]
								    ]       ,					device=__lowerCAmelCase       ,					)

								# 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
								__magic_name__		:Optional[Any]        =      torch.all((expected_slice / output[..., :3, :3]) >= 1 - TOLERANCE     )
								__magic_name__		:Any        =      torch.all((expected_slice / output[..., :3, :3]) <= 1 + TOLERANCE     )

								self.assertTrue(lower_bound and upper_bound     )














import unittest

import numpy as np
import torch

from .utils_summarization import build_mask, compute_token_type_ids, process_story, truncate_or_pad
class 						lowerCamelCase_				(      unittest.TestCase ):







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      1_0







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      [1, 2, 3, 4]
								__magic_name__		:Union[str, Any]        =      [1, 2, 3, 4, 0, 0, 0, 0, 0, 0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								__magic_name__		:Optional[Any]        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0, 1_1, 1_2, 1_3]
								__magic_name__		:str        =      [1, 2, 3, 4, 5, 6, 7, 8, 9, 1_0]
								self.assertEqual(truncate_or_pad(__lowerCAmelCase       ,					self.block_size       ,					0     )       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Tuple        =      '''It was the year of Our Lord one thousand seven hundred and
        seventy-five.\n\nSpiritual revelations were conceded to England at that
        favoured period, as at this.'''
								__magic_name__     ,				__magic_name__		:Optional[int]        =      process_story(__lowerCAmelCase     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Union[str, Any]        =      ''''''
								__magic_name__     ,				__magic_name__		:Optional[int]        =      process_story(__lowerCAmelCase     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )
								self.assertEqual(__lowerCAmelCase       ,					[]     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[Any]        =      (
								    '''It was the year of Our Lord one thousand seven hundred and '''
								    '''seventy-five\n\nSpiritual revelations were conceded to England '''
								    '''at that favoured period, as at this.\n@highlight\n\nIt was the best of times'''
								)
								__magic_name__     ,				__magic_name__		:str        =      process_story(__lowerCAmelCase     )

								__magic_name__		:Optional[int]        =      [
								    '''It was the year of Our Lord one thousand seven hundred and seventy-five.''',
								    '''Spiritual revelations were conceded to England at that favoured period, as at this.''',
								]
								self.assertEqual(__lowerCAmelCase       ,					__lowerCAmelCase     )

								__magic_name__		:Union[str, Any]        =      ['''It was the best of times.''']
								self.assertEqual(__lowerCAmelCase       ,					__lowerCAmelCase     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      torch.tensor([1, 2, 3, 4]     )
								__magic_name__		:List[str]        =      torch.tensor([1, 1, 1, 1]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					0     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:List[str]        =      torch.tensor([1, 2, 3, 4, 2_3, 2_3, 2_3]     )
								__magic_name__		:Union[str, Any]        =      torch.tensor([1, 1, 1, 1, 0, 0, 0]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					2_3     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Any        =      torch.tensor([8, 2, 3, 4, 1, 1, 1]     )
								__magic_name__		:Dict        =      torch.tensor([1, 1, 1, 1, 0, 0, 0]     )
								np.testing.assert_array_equal(build_mask(__lowerCAmelCase       ,					1     ).numpy()       ,					expected.numpy()     )







				def 			A	(						self     ):
								"""simple docstring"""
								__magic_name__		:Dict        =      1_0_1
								__magic_name__		:List[Any]        =      torch.tensor([[1, 2, 3, 4, 5, 6], [1, 2, 3, 1_0_1, 5, 6], [1, 1_0_1, 3, 4, 1_0_1, 6]]     )
								__magic_name__		:str        =      torch.tensor([[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1]]     )

								__magic_name__		:Tuple        =      compute_token_type_ids(__lowerCAmelCase       ,					__lowerCAmelCase     )
								np.testing.assert_array_equal(__lowerCAmelCase       ,					__lowerCAmelCase     )






