




import logging

from transformers.configuration_utils import PretrainedConfig


SCREAMING_SNAKE_CASE__       :      Any  =   logging.getLogger(__name__)




class 		UpperCamelCase__	(__SCREAMING_SNAKE_CASE     ):

    '''simple docstring'''



    lowerCamelCase_      :	int	     =      """masked_bert"""







    def __init__(    self     ,  UpperCamelCase__=3_0522     ,  UpperCamelCase__=768     ,  UpperCamelCase__=12     ,  UpperCamelCase__=12     ,  UpperCamelCase__=3072     ,  UpperCamelCase__="gelu"     ,  UpperCamelCase__=0.1     ,  UpperCamelCase__=0.1     ,  UpperCamelCase__=512     ,  UpperCamelCase__=2     ,  UpperCamelCase__=0.02     ,  UpperCamelCase__=1e-12     ,  UpperCamelCase__=0     ,  UpperCamelCase__="topK"     ,  UpperCamelCase__="constant"     ,  UpperCamelCase__=0.0     ,  **UpperCamelCase__     ,  )     ->      List[Any]:
           super().__init__(pad_token_id=UpperCAmelCase_     ,  **UpperCAmelCase_     )

           lowerCamelCase   :      Optional[int]			 =					vocab_size
           lowerCamelCase   :      Dict			 =					hidden_size
           lowerCamelCase   :      Optional[int]			 =					num_hidden_layers
           lowerCamelCase   :      Any			 =					num_attention_heads
           lowerCamelCase   :      List[Any]			 =					hidden_act
           lowerCamelCase   :      str			 =					intermediate_size
           lowerCamelCase   :      Dict			 =					hidden_dropout_prob
           lowerCamelCase   :      str			 =					attention_probs_dropout_prob
           lowerCamelCase   :      int			 =					max_position_embeddings
           lowerCamelCase   :      Tuple			 =					type_vocab_size
           lowerCamelCase   :      str			 =					initializer_range
           lowerCamelCase   :      List[Any]			 =					layer_norm_eps
           lowerCamelCase   :      str			 =					pruning_method
           lowerCamelCase   :      Union[str, Any]			 =					mask_init
           lowerCamelCase   :      Optional[Any]			 =					mask_scale













class    _SCREAMING_SNAKE_CASE						:







 '''simple docstring'''

 def __init__(self				:   Optional[Any]       , UpperCAmelCase_				:   int)       ->Optional[int]:



   '''simple docstring'''



   lowerCamelCase__:      Any			  =n
   lowerCamelCase__:      Tuple			  =[None] * self.n
   lowerCamelCase__:      str			  =0  # index of the first element
   lowerCamelCase__:      Tuple			  =0
   lowerCamelCase__:      Optional[Any]			  =0

 def __len__(self				:   str)       ->int:



   '''simple docstring'''



   return self.size

 def 							SCREAMING_SNAKE_CASE_					(self				:   int)       ->bool:



   '''simple docstring'''



   return self.size == 0

 def 							SCREAMING_SNAKE_CASE_					(self				:   List[str])       ->str:



   '''simple docstring'''



   return False if self.is_empty() else self.array[self.front]

 def 							SCREAMING_SNAKE_CASE_					(self				:   int       , UpperCAmelCase_				:   Optional[int])       ->str:



   '''simple docstring'''



   if self.size >= self.n:
     raise Exception("QUEUE IS FULL")

   lowerCamelCase__:      List[Any]			  =data
   lowerCamelCase__:      Dict			  =(self.rear + 1) % self.n
   self.size += 1
   return self







 def 							SCREAMING_SNAKE_CASE_					(self				:   Tuple)       ->Tuple:



   '''simple docstring'''



   if self.size == 0:
     raise Exception("UNDERFLOW")

   lowerCamelCase__:      Optional[Any]			  =self.array[self.front]
   lowerCamelCase__:      Optional[int]			  =None
   lowerCamelCase__:      Dict			  =(self.front + 1) % self.n
   self.size -= 1
   return temp

