






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


__UpperCAmelCase     							=						logging.get_logger(__name__)

__UpperCAmelCase     							=						{
    'facebook/timesformer': 'https://huggingface.co/facebook/timesformer/resolve/main/config.json',
}



class   lowerCamelCase				(__lowercase      ):







		'''simple docstring'''



		_snake_case   :   Optional[Any]							=  '''timesformer'''



		def __init__(							self    ,		_UpperCamelCase=2_2_4    ,		_UpperCamelCase=1_6    ,		_UpperCamelCase=3    ,		_UpperCamelCase=8    ,		_UpperCamelCase=7_6_8    ,		_UpperCamelCase=1_2    ,		_UpperCamelCase=1_2    ,		_UpperCamelCase=3_0_7_2    ,		_UpperCamelCase="gelu"    ,		_UpperCamelCase=0.0    ,		_UpperCamelCase=0.0    ,		_UpperCamelCase=0.02    ,		_UpperCamelCase=1E-6    ,		_UpperCamelCase=True    ,		_UpperCamelCase="divided_space_time"    ,		_UpperCamelCase=0    ,		**_UpperCamelCase    ,		)     ->							Any:
							super().__init__(**_a       )

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

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

							UpperCAmelCase_   :				Optional[Any]						=				attention_type
							UpperCAmelCase_   :				int						=				drop_path_rate














from __future__ import annotations




def 					lowercase__				(					__snake_case   :							list[int]					,	__snake_case   :							int  ):


					'''simple docstring'''


					if len(__snake_case  ) < k or k < 0:
										raise ValueError('Invalid Input'  )
					UpperCAmelCase_   :				int						=						sum(array[:k]  )
					for i in range(len(__snake_case  ) - k  ):
										UpperCAmelCase_   :				List[Any]						=						current_sum - array[i] + array[i + k]
										UpperCAmelCase_   :				List[Any]						=						max(__snake_case					,	__snake_case  )
					return max_sum


if __name__ == "__main__":
		from doctest import testmod
		from random import randint

		testmod()
		__UpperCAmelCase     							=						[randint(-1000, 1000) for i in range(100)]
		__UpperCAmelCase     							=						randint(0, 110)
		print(F'The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}')






