



from __future__ import annotations

from typing import Any


class   snake_case_ :




       """simple docstring"""






       def __init__(     self     ,lowercase = 6):

             """simple docstring"""





             UpperCAmelCase_  :	Node | None				      =		None
             UpperCAmelCase_  :	Node | None				      =		None
             self.create_linked_list(lowercase)



       def  A_   (     self     ,lowercase):

             """simple docstring"""





             UpperCAmelCase_  :	List[Any]				      =		Node()
             UpperCAmelCase_  :	Tuple				      =		current_node
             UpperCAmelCase_  :	Optional[int]				      =		current_node
             UpperCAmelCase_  :	Union[str, Any]				      =		current_node
             for _ in range(1     ,lowercase):
                   UpperCAmelCase_  :	Optional[int]				      =		Node()
                   UpperCAmelCase_  :	str				      =		current_node
                   UpperCAmelCase_  :	List[str]				      =		previous_node
                   UpperCAmelCase_  :	List[Any]				      =		current_node
             UpperCAmelCase_  :	List[str]				      =		self.front
             UpperCAmelCase_  :	Union[str, Any]				      =		previous_node



       def  A_   (     self):

             """simple docstring"""





             return (
                 self.front == self.rear
                 and self.front is not None
                 and self.front.data is None
             )



       def  A_   (     self):

             """simple docstring"""





             self.check_can_perform_operation()
             return self.front.data if self.front else None



       def  A_   (     self     ,lowercase):

             """simple docstring"""





             if self.rear is None:
                   return

             self.check_is_full()
             if not self.is_empty():
                   UpperCAmelCase_  :	str				      =		self.rear.next
             if self.rear:
                   UpperCAmelCase_  :	List[Any]				      =		data



       def  A_   (     self):

             """simple docstring"""





             self.check_can_perform_operation()
             if self.rear is None or self.front is None:
                   return None
             if self.front == self.rear:
                   UpperCAmelCase_  :	Tuple				      =		self.front.data
                   UpperCAmelCase_  :	Tuple				      =		None
                   return data

             UpperCAmelCase_  :	List[str]				      =		self.front
             UpperCAmelCase_  :	Any				      =		old_front.next
             UpperCAmelCase_  :	int				      =		old_front.data
             UpperCAmelCase_  :	int				      =		None
             return data



       def  A_   (     self):

             """simple docstring"""





             if self.is_empty():
                   raise Exception("Empty Queue")



       def  A_   (     self):

             """simple docstring"""





             if self.rear and self.rear.next == self.front:
                   raise Exception("Full Queue")





class   snake_case_ :




       """simple docstring"""






       def __init__(     self):

             """simple docstring"""





             UpperCAmelCase_  :	Any | None				      =		None
             UpperCAmelCase_  :	Node | None				      =		None
             UpperCAmelCase_  :	Node | None				      =		None


if __name__ == "__main__":
   import doctest

   doctest.testmod()





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


__lowerCamelCase         =			logging.get_logger(__name__)

__lowerCamelCase         =			{
    '''unc-nlp/lxmert-base-uncased''': '''https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json''',
}


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       _lowerCamelCase			    =				"""lxmert"""
       _lowerCamelCase			    =				{}



       def __init__(     self     ,lowercase=30522     ,lowercase=768     ,lowercase=12     ,lowercase=9500     ,lowercase=1600     ,lowercase=400     ,lowercase=3072     ,lowercase="gelu"     ,lowercase=0.1     ,lowercase=0.1     ,lowercase=512     ,lowercase=2     ,lowercase=0.02     ,lowercase=1E-12     ,lowercase=9     ,lowercase=5     ,lowercase=5     ,lowercase=2048     ,lowercase=4     ,lowercase=6.67     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,lowercase=True     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	List[str]				      =		vocab_size
             UpperCAmelCase_  :	str				      =		hidden_size
             UpperCAmelCase_  :	List[str]				      =		num_attention_heads
             UpperCAmelCase_  :	Dict				      =		hidden_act
             UpperCAmelCase_  :	List[Any]				      =		intermediate_size
             UpperCAmelCase_  :	Tuple				      =		hidden_dropout_prob
             UpperCAmelCase_  :	List[Any]				      =		attention_probs_dropout_prob
             UpperCAmelCase_  :	Any				      =		max_position_embeddings
             UpperCAmelCase_  :	str				      =		type_vocab_size
             UpperCAmelCase_  :	Any				      =		initializer_range
             UpperCAmelCase_  :	Optional[Any]				      =		layer_norm_eps
             UpperCAmelCase_  :	Any				      =		num_qa_labels
             UpperCAmelCase_  :	str				      =		num_object_labels
             UpperCAmelCase_  :	Dict				      =		num_attr_labels
             UpperCAmelCase_  :	Tuple				      =		l_layers
             UpperCAmelCase_  :	Tuple				      =		x_layers
             UpperCAmelCase_  :	int				      =		r_layers
             UpperCAmelCase_  :	Optional[Any]				      =		visual_feat_dim
             UpperCAmelCase_  :	List[Any]				      =		visual_pos_dim
             UpperCAmelCase_  :	int				      =		visual_loss_normalizer
             UpperCAmelCase_  :	str				      =		task_matched
             UpperCAmelCase_  :	str				      =		task_mask_lm
             UpperCAmelCase_  :	int				      =		task_obj_predict
             UpperCAmelCase_  :	List[str]				      =		task_qa
             UpperCAmelCase_  :	Optional[int]				      =		visual_obj_loss
             UpperCAmelCase_  :	List[str]				      =		visual_attr_loss
             UpperCAmelCase_  :	str				      =		visual_feat_loss
             UpperCAmelCase_  :	List[Any]				      =		{"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
             super().__init__(**lowercase)
