



from __future__ import annotations

from typing import Generic, TypeVar

__lowerCamelCase								=      TypeVar('''T''')


class 	snake_case_			(lowercase__	):




       """simple docstring"""






       pass


class 	snake_case_			(lowercase__	):




       """simple docstring"""






       pass


class 	snake_case_			(Generic[T]	):




       """simple docstring"""






       def __init__(  self  ,lowercase = 10):

             """simple docstring"""





             UpperCAmelCase_	:						list[T]					   =		[]
             UpperCAmelCase_	:						Dict					   =		limit



       def __bool__(  self):

             """simple docstring"""





             return bool(self.stack)



       def __str__(  self):

             """simple docstring"""





             return str(self.stack)



       def 			A_ (  self  ,lowercase):

             """simple docstring"""





             if len(self.stack) >= self.limit:
                   raise StackOverflowError
             self.stack.append(lowercase)



       def 			A_ (  self):

             """simple docstring"""





             if not self.stack:
                   raise StackUnderflowError
             return self.stack.pop()



       def 			A_ (  self):

             """simple docstring"""





             if not self.stack:
                   raise StackUnderflowError
             return self.stack[-1]



       def 			A_ (  self):

             """simple docstring"""





             return not bool(self.stack)



       def 			A_ (  self):

             """simple docstring"""





             return self.size() == self.limit



       def 			A_ (  self):

             """simple docstring"""





             return len(self.stack)



       def __contains__(  self  ,lowercase):

             """simple docstring"""





             return item in self.stack







def  _snake_case			(							)  ->  None:






      '''simple docstring'''







      UpperCAmelCase_	:						Stack[int]					   =		Stack(1_0     )
      assert bool(__snake_case     ) is False
      assert stack.is_empty() is True
      assert stack.is_full() is False
      assert str(__snake_case     ) == "[]"

      try:
            UpperCAmelCase_	:						Dict					   =		stack.pop()
            raise AssertionError  # This should not happen
      except StackUnderflowError:
            assert True  # This should happen

      try:
            UpperCAmelCase_	:						Optional[Any]					   =		stack.peek()
            raise AssertionError  # This should not happen
      except StackUnderflowError:
            assert True  # This should happen

      for i in range(1_0     ):
            assert stack.size() == i
            stack.push(__snake_case     )

      assert bool(__snake_case     )
      assert not stack.is_empty()
      assert stack.is_full()
      assert str(__snake_case     ) == str(list(range(1_0     )     )     )
      assert stack.pop() == 9
      assert stack.peek() == 8

      stack.push(1_0_0     )
      assert str(__snake_case     ) == str([0, 1, 2, 3, 4, 5, 6, 7, 8, 1_0_0]     )

      try:
            stack.push(2_0_0     )
            raise AssertionError  # This should not happen
      except StackOverflowError:
            assert True  # This should happen

      assert not stack.is_empty()
      assert stack.size() == 1_0

      assert 5 in stack
      assert 5_5 not in stack


if __name__ == "__main__":
   test_stack()





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


__lowerCamelCase								=      logging.get_logger(__name__)

__lowerCamelCase								=      {
    '''MCG-NJU/videomae-base''': '''https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json''',
}


class 	snake_case_			(lowercase__	):




       """simple docstring"""






       _lowerCamelCase           =					"""videomae"""



       def __init__(  self  ,lowercase=224  ,lowercase=16  ,lowercase=3  ,lowercase=16  ,lowercase=2  ,lowercase=768  ,lowercase=12  ,lowercase=12  ,lowercase=3072  ,lowercase="gelu"  ,lowercase=0.0  ,lowercase=0.0  ,lowercase=0.02  ,lowercase=1E-12  ,lowercase=True  ,lowercase=True  ,lowercase=6  ,lowercase=384  ,lowercase=4  ,lowercase=1536  ,lowercase=True  ,**lowercase  ,):

             """simple docstring"""





             super().__init__(**lowercase)

             UpperCAmelCase_	:						Optional[int]					   =		image_size
             UpperCAmelCase_	:						Optional[Any]					   =		patch_size
             UpperCAmelCase_	:						Tuple					   =		num_channels
             UpperCAmelCase_	:						Optional[int]					   =		num_frames
             UpperCAmelCase_	:						str					   =		tubelet_size

             UpperCAmelCase_	:						Any					   =		hidden_size
             UpperCAmelCase_	:						List[str]					   =		num_hidden_layers
             UpperCAmelCase_	:						List[str]					   =		num_attention_heads
             UpperCAmelCase_	:						Union[str, Any]					   =		intermediate_size
             UpperCAmelCase_	:						List[str]					   =		hidden_act
             UpperCAmelCase_	:						Tuple					   =		hidden_dropout_prob
             UpperCAmelCase_	:						Optional[Any]					   =		attention_probs_dropout_prob
             UpperCAmelCase_	:						Optional[Any]					   =		initializer_range
             UpperCAmelCase_	:						Dict					   =		layer_norm_eps
             UpperCAmelCase_	:						Tuple					   =		qkv_bias
             UpperCAmelCase_	:						int					   =		use_mean_pooling

             UpperCAmelCase_	:						List[Any]					   =		decoder_num_attention_heads
             UpperCAmelCase_	:						Optional[int]					   =		decoder_hidden_size
             UpperCAmelCase_	:						Any					   =		decoder_num_hidden_layers
             UpperCAmelCase_	:						Dict					   =		decoder_intermediate_size
             UpperCAmelCase_	:						str					   =		norm_pix_loss
