





"""simple docstring"""
class 					_UpperCAmelCase   :


					def __init__(					self			:List[Any]     ,       __UpperCamelCase			:int		):
												A		=  size
												A		=  [0] * size
												A		=  [0] * size


					@staticmethod
					def 	lowerCamelCase       (					__UpperCamelCase			:int		):
												return index | (index + 1)


					@staticmethod
					def 	lowerCamelCase       (					__UpperCamelCase			:int		):
												return (index & (index + 1)) - 1


					def 	lowerCamelCase       (					self			:Tuple     ,       __UpperCamelCase			:int     ,       __UpperCamelCase			:int		):
												A		=  value
												while index < self.size:
																			A		=  self.get_prev(__UpperCamelCase		) + 1
																			if current_left_border == index:
																										A		=  value
																			else:
																										A		=  max(__UpperCamelCase     ,       __UpperCamelCase     ,       __UpperCamelCase		)
																			A		=  self.get_next(__UpperCamelCase		)


					def 	lowerCamelCase       (					self			:List[Any]     ,       __UpperCamelCase			:int     ,       __UpperCamelCase			:int		):
												right -= 1  # Because of right is exclusive
												A		=  0
												while left <= right:
																			A		=  self.get_prev(__UpperCamelCase		)
																			if left <= current_left:
																										A		=  max(__UpperCamelCase     ,       self.tree[right]		)
																										A		=  current_left
																			else:
																										A		=  max(__UpperCamelCase     ,       self.arr[right]		)
																										right -= 1
												return result


if __name__ == "__main__":
		import doctest

		doctest.testmod()









"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_snake_case     :		Optional[int]       						= logging.get_logger(__name__)

_snake_case     :		Optional[int]       						= {
    'google/vivit-b-16x2-kinetics400': (
        'https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json'
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}






class 					_UpperCAmelCase   (	lowercase_ ):
					UpperCamelCase      =							'''vivit'''


					def __init__(					self			:Optional[Any]     ,       __UpperCamelCase			:Dict=2_24     ,       __UpperCamelCase			:int=32     ,       __UpperCamelCase			:Union[str, Any]=[2, 16, 16]     ,       __UpperCamelCase			:Optional[Any]=3     ,       __UpperCamelCase			:Optional[Any]=7_68     ,       __UpperCamelCase			:Any=12     ,       __UpperCamelCase			:List[str]=12     ,       __UpperCamelCase			:List[str]=30_72     ,       __UpperCamelCase			:Any="gelu_fast"     ,       __UpperCamelCase			:List[Any]=0.0     ,       __UpperCamelCase			:str=0.0     ,       __UpperCamelCase			:Dict=0.02     ,       __UpperCamelCase			:Optional[Any]=1e-06     ,       __UpperCamelCase			:Dict=True     ,       **__UpperCamelCase			:Tuple     ,       ):
												A		=  hidden_size
												A		=  num_hidden_layers
												A		=  num_attention_heads
												A		=  intermediate_size
												A		=  hidden_act
												A		=  hidden_dropout_prob
												A		=  attention_probs_dropout_prob
												A		=  initializer_range
												A		=  layer_norm_eps

												A		=  image_size
												A		=  num_frames
												A		=  tubelet_size
												A		=  num_channels
												A		=  qkv_bias

												super().__init__(**__UpperCamelCase		)


