






import math
import os
import unittest

from transformers import MegatronBertConfig, 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,
			    MegatronBertForCausalLM,
			    MegatronBertForMaskedLM,
			    MegatronBertForMultipleChoice,
			    MegatronBertForNextSentencePrediction,
			    MegatronBertForPreTraining,
			    MegatronBertForQuestionAnswering,
			    MegatronBertForSequenceClassification,
			    MegatronBertForTokenClassification,
			    MegatronBertModel,
			)




class 							snake_case_       :

						"""simple docstring"""



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




											'''simple docstring'''



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



						def        UpperCAmelCase__					(self:					int   )    ->     Any:




											'''simple docstring'''



											__a					:						Dict      =					ids_tensor([self.batch_size, self.seq_length] ,					self.vocab_size   )

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

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

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

											__a					:						Optional[Any]      =					self.get_config()

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



						def        UpperCAmelCase__					(self:					int   )    ->     Dict:




											'''simple docstring'''



											return MegatronBertConfig(
											    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=__UpperCAmelCase ,					initializer_range=self.initializer_range ,					)



						def        UpperCAmelCase__					(self:					List[Any] ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					Any ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					List[str] ,					__UpperCAmelCase:					List[str]   )    ->     List[Any]:




											'''simple docstring'''



											__a					:						Tuple      =					MegatronBertModel(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Tuple      =					model(__UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase   )
											__a					:						int      =					model(__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase   )
											__a					:						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        UpperCAmelCase__					(self:					List[str] ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					Tuple   )    ->     Optional[int]:




											'''simple docstring'''



											__a					:						int      =					MegatronBertForMaskedLM(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Dict      =					model(__UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase   )
											self.parent.assertEqual(result.logits.shape ,					(self.batch_size, self.seq_length, self.vocab_size)   )



						def        UpperCAmelCase__					(self:					List[str] ,					__UpperCAmelCase:					List[Any] ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					List[str] ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					int   )    ->     Tuple:




											'''simple docstring'''



											__a					:						Tuple      =					MegatronBertForCausalLM(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						int      =					model(__UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase   )
											self.parent.assertEqual(result.logits.shape ,					(self.batch_size, self.seq_length, self.vocab_size)   )



						def        UpperCAmelCase__					(self:					str ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					List[str] ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Any ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					Any   )    ->     str:




											'''simple docstring'''



											__a					:						int      =					MegatronBertForNextSentencePrediction(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Optional[Any]      =					model(
											    __UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase ,					)
											self.parent.assertEqual(result.logits.shape ,					(self.batch_size, 2)   )



						def        UpperCAmelCase__					(self:					Any ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					List[str] ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					int   )    ->     List[str]:




											'''simple docstring'''



											__a					:						Dict      =					MegatronBertForPreTraining(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Tuple      =					model(
											    __UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase ,					next_sentence_label=__UpperCAmelCase ,					)
											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        UpperCAmelCase__					(self:					str ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					List[Any] ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					int   )    ->     int:




											'''simple docstring'''



											__a					:						Any      =					MegatronBertForQuestionAnswering(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Any      =					model(
											    __UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					start_positions=__UpperCAmelCase ,					end_positions=__UpperCAmelCase ,					)
											self.parent.assertEqual(result.start_logits.shape ,					(self.batch_size, self.seq_length)   )
											self.parent.assertEqual(result.end_logits.shape ,					(self.batch_size, self.seq_length)   )



						def        UpperCAmelCase__					(self:					int ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					Union[str, Any] ,					__UpperCAmelCase:					Any ,					__UpperCAmelCase:					Optional[int]   )    ->     Optional[int]:




											'''simple docstring'''



											__a					:						List[Any]      =					self.num_labels
											__a					:						Optional[int]      =					MegatronBertForSequenceClassification(__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						Optional[int]      =					model(__UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase   )
											self.parent.assertEqual(result.logits.shape ,					(self.batch_size, self.num_labels)   )



						def        UpperCAmelCase__					(self:					str ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					List[Any] ,					__UpperCAmelCase:					Tuple ,					__UpperCAmelCase:					List[Any] ,					__UpperCAmelCase:					int ,					__UpperCAmelCase:					List[str] ,					__UpperCAmelCase:					List[str]   )    ->     Any:




											'''simple docstring'''



											__a					:						List[str]      =					self.num_labels
											__a					:						List[Any]      =					MegatronBertForTokenClassification(config=__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.eval()
											__a					:						List[Any]      =					model(__UpperCAmelCase ,					attention_mask=__UpperCAmelCase ,					token_type_ids=__UpperCAmelCase ,					labels=__UpperCAmelCase   )
											self.parent.assertEqual(result.logits.shape ,					(self.batch_size, self.seq_length, self.num_labels)   )



						def        UpperCAmelCase__					(self:					Dict ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Optional[Any] ,					__UpperCAmelCase:					str ,					__UpperCAmelCase:					Optional[int] ,					__UpperCAmelCase:					Tuple   )    ->     Dict:




											'''simple docstring'''



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



						def        UpperCAmelCase__					(self:					int   )    ->     Union[str, Any]:




											'''simple docstring'''



											__a					:						int      =					self.prepare_config_and_inputs()
											(
											    (
											    __a
											)      ,			(
											    __a
											)      ,			(
											    __a
											)      ,			(
											    __a
											)      ,			(
											    __a
											)      ,			(
											    __a
											)      ,			(
											    __a
											)      ,			
											)					:						Dict      =					config_and_inputs
											__a					:						str      =					{"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
											return config, inputs_dict




@require_torch
class 							snake_case_       (    __UpperCamelCase		,							__UpperCamelCase		,							unittest.TestCase      ):

						"""simple docstring"""



						snake_case__        =      (
						    (
						        MegatronBertModel,
						        MegatronBertForMaskedLM,
						        MegatronBertForCausalLM,
						        MegatronBertForMultipleChoice,
						        MegatronBertForNextSentencePrediction,
						        MegatronBertForPreTraining,
						        MegatronBertForQuestionAnswering,
						        MegatronBertForSequenceClassification,
						        MegatronBertForTokenClassification,
						    )
						    if is_torch_available()
						    else ()
						)
						snake_case__        =      (
						    {
						        """feature-extraction""": MegatronBertModel,
						        """fill-mask""": MegatronBertForMaskedLM,
						        """question-answering""": MegatronBertForQuestionAnswering,
						        """text-classification""": MegatronBertForSequenceClassification,
						        """text-generation""": MegatronBertForCausalLM,
						        """token-classification""": MegatronBertForTokenClassification,
						        """zero-shot""": MegatronBertForSequenceClassification,
						    }
						    if is_torch_available()
						    else {}
						)
						snake_case__        =      True
						# test_resize_embeddings = False
						snake_case__        =      False



						def        UpperCAmelCase__					(self:					Union[str, Any] ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Dict ,					__UpperCAmelCase:					Dict=False   )    ->     Dict:




											'''simple docstring'''



											__a					:						Union[str, Any]      =					super()._prepare_for_class(__UpperCAmelCase ,					__UpperCAmelCase ,					return_labels=__UpperCAmelCase   )

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



						def        UpperCAmelCase__					(self:					int   )    ->     Tuple:




											'''simple docstring'''



											__a					:						str      =					MegatronBertModelTester(self   )
											__a					:						Optional[Any]      =					ConfigTester(self ,					config_class=__UpperCAmelCase ,					hidden_size=37   )



						def        UpperCAmelCase__					(self:					Dict   )    ->     Dict:




											'''simple docstring'''



											self.config_tester.run_common_tests()



						def        UpperCAmelCase__					(self:					Tuple   )    ->     List[Any]:




											'''simple docstring'''



											__a					:						Optional[Any]      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_model(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Union[str, Any]   )    ->     Optional[Any]:




											'''simple docstring'''



											__a					:						List[str]      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_masked_lm(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					List[str]   )    ->     Optional[int]:




											'''simple docstring'''



											__a					:						Union[str, Any]      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_multiple_choice(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Optional[int]   )    ->     int:




											'''simple docstring'''



											__a					:						Tuple      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_next_sequence_prediction(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					int   )    ->     Any:




											'''simple docstring'''



											__a					:						List[Any]      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_pretraining(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Optional[int]   )    ->     Dict:




											'''simple docstring'''



											__a					:						Optional[Any]      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_question_answering(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Any   )    ->     List[str]:




											'''simple docstring'''



											__a					:						int      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_sequence_classification(*__UpperCAmelCase   )



						def        UpperCAmelCase__					(self:					Dict   )    ->     int:




											'''simple docstring'''



											__a					:						int      =					self.model_tester.prepare_config_and_inputs()
											self.model_tester.create_and_check_megatron_bert_for_token_classification(*__UpperCAmelCase   )







def     a_   (__A      )				->						int:



					"""simple docstring"""
					return torch.tensor(
					    __A				,       dtype=torch.long				,       device=__A				,       )


UpperCAmelCase__      			=						1e-4




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

						"""simple docstring"""



						@slow
						@unittest.skip("Model is not available."   )
						def        UpperCAmelCase__					(self:					Any   )    ->     int:




											'''simple docstring'''



											__a					:						Dict      =					"nvidia/megatron-bert-uncased-345m"
											if "MYDIR" in os.environ:
																__a					:						Union[str, Any]      =					os.path.join(os.environ["MYDIR"] ,					__UpperCAmelCase   )
											__a					:						Optional[Any]      =					MegatronBertModel.from_pretrained(__UpperCAmelCase   )
											model.to(__UpperCAmelCase   )
											model.half()
											__a					:						List[str]      =					_long_tensor([[101, 7110, 1005, 1056, 2023, 11333, 17413, 1029, 102]]   )
											with torch.no_grad():
																__a					:						Optional[int]      =					model(__UpperCAmelCase   )[0]
											__a					:						Optional[Any]      =					torch.Size((1, 9, 1024)   )
											self.assertEqual(output.shape ,					__UpperCAmelCase   )

											__a					:						List[str]      =					[-0.60_40, -0.25_17, -0.10_25, 0.34_20, -0.67_58, -0.00_17, -0.10_89, -0.19_90, 0.57_28]
											for ii in range(3   ):
																for jj in range(3   ):
																					__a					:						Optional[int]      =					output[0, ii, jj]
																					__a					:						List[Any]      =					expected[3 * ii + jj]
																					__a					:						Any      =					"ii={} jj={} a={} b={}".format(__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase ,					__UpperCAmelCase   )
																					self.assertTrue(math.isclose(__UpperCAmelCase ,					__UpperCAmelCase ,					rel_tol=__UpperCAmelCase ,					abs_tol=__UpperCAmelCase   ) ,					msg=__UpperCAmelCase   )













from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase__      			=						logging.get_logger(__name__)

UpperCAmelCase__      			=						{
    '''vinvino02/glpn-kitti''': '''https://huggingface.co/vinvino02/glpn-kitti/resolve/main/config.json''',
    # See all GLPN models at https://huggingface.co/models?filter=glpn
}




class 							snake_case_       (    __UpperCamelCase      ):

						"""simple docstring"""



						snake_case__        =      """glpn"""



						def __init__(self:					Tuple ,					__UpperCAmelCase:					Tuple=3 ,					__UpperCAmelCase:					Dict=4 ,					__UpperCAmelCase:					Any=[2, 2, 2, 2] ,					__UpperCAmelCase:					Optional[int]=[8, 4, 2, 1] ,					__UpperCAmelCase:					Dict=[32, 64, 160, 256] ,					__UpperCAmelCase:					List[str]=[7, 3, 3, 3] ,					__UpperCAmelCase:					Dict=[4, 2, 2, 2] ,					__UpperCAmelCase:					Optional[int]=[1, 2, 5, 8] ,					__UpperCAmelCase:					Dict=[4, 4, 4, 4] ,					__UpperCAmelCase:					List[str]="gelu" ,					__UpperCAmelCase:					str=0.0 ,					__UpperCAmelCase:					List[Any]=0.0 ,					__UpperCAmelCase:					Dict=0.02 ,					__UpperCAmelCase:					List[str]=0.1 ,					__UpperCAmelCase:					Union[str, Any]=1E-6 ,					__UpperCAmelCase:					Dict=64 ,					__UpperCAmelCase:					Dict=10 ,					__UpperCAmelCase:					Union[str, Any]=-1 ,					**__UpperCAmelCase:					Dict ,					)    ->     str:




											'''simple docstring'''



											super().__init__(**__UpperCAmelCase   )

											__a					:						Optional[Any]      =					num_channels
											__a					:						Tuple      =					num_encoder_blocks
											__a					:						int      =					depths
											__a					:						Union[str, Any]      =					sr_ratios
											__a					:						str      =					hidden_sizes
											__a					:						List[Any]      =					patch_sizes
											__a					:						Optional[Any]      =					strides
											__a					:						Any      =					mlp_ratios
											__a					:						Any      =					num_attention_heads
											__a					:						Any      =					hidden_act
											__a					:						List[Any]      =					hidden_dropout_prob
											__a					:						int      =					attention_probs_dropout_prob
											__a					:						List[str]      =					initializer_range
											__a					:						Optional[int]      =					drop_path_rate
											__a					:						Any      =					layer_norm_eps
											__a					:						List[Any]      =					decoder_hidden_size
											__a					:						Any      =					max_depth
											__a					:						int      =					head_in_index





