'''simple docstring'''






from __future__ import annotations

from collections.abc import Iterator
from typing import Generic, TypeVar

SCREAMING_SNAKE_CASE_	   =			TypeVar('T')




class    a (       Generic[T]				):



  """simple docstring"""







  def __init__(							self   ,    snake_case_					):

    '''simple docstring'''







    __UpperCAmelCase:					Union[str, Any]		= data
    __UpperCAmelCase:					Node[T] | None		= None







  def __str__(							self					):

    '''simple docstring'''







    return F'''{self.data}'''




class    a (       Generic[T]				):



  """simple docstring"""







  def __init__(							self					):

    '''simple docstring'''







    __UpperCAmelCase:					Node[T] | None		= None







  def __iter__(							self					):

    '''simple docstring'''







    __UpperCAmelCase:					Tuple		= self.top
    while node:
      yield node.data
      __UpperCAmelCase:					Union[str, Any]		= node.next







  def __str__(							self					):

    '''simple docstring'''







    return "->".join([str(snake_case_					) for item in self]					)







  def __len__(							self					):

    '''simple docstring'''







    return len(tuple(iter(self					)					)					)







  def    lowercase_  (							self					):

    '''simple docstring'''







    return self.top is None







  def    lowercase_  (							self   ,    snake_case_					):

    '''simple docstring'''







    __UpperCAmelCase:					Optional[Any]		= Node(snake_case_					)
    if not self.is_empty():
      __UpperCAmelCase:					Any		= self.top
    __UpperCAmelCase:					int		= node







  def    lowercase_  (							self					):

    '''simple docstring'''







    if self.is_empty():
      raise IndexError("""pop from empty stack"""					)
    assert isinstance(self.top   ,    snake_case_					)
    __UpperCAmelCase:					str		= self.top
    __UpperCAmelCase:					Any		= self.top.next
    return pop_node.data







  def    lowercase_  (							self					):

    '''simple docstring'''







    if self.is_empty():
      raise IndexError("""peek from empty stack"""					)

    assert self.top is not None
    return self.top.data







  def    lowercase_  (							self					):

    '''simple docstring'''







    __UpperCAmelCase:					Tuple		= None


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

    testmod()
'''simple docstring'''






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


SCREAMING_SNAKE_CASE_	   =			logging.get_logger(__name__)

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




class    a (       __lowerCAmelCase				):



  """simple docstring"""
  __lowerCAmelCase				      =					"""timesformer"""







  def __init__(							self   ,    snake_case_=224   ,    snake_case_=16   ,    snake_case_=3   ,    snake_case_=8   ,    snake_case_=768   ,    snake_case_=12   ,    snake_case_=12   ,    snake_case_=3072   ,    snake_case_="gelu"   ,    snake_case_=0.0   ,    snake_case_=0.0   ,    snake_case_=0.0_2   ,    snake_case_=1e-6   ,    snake_case_=True   ,    snake_case_="divided_space_time"   ,    snake_case_=0   ,    **snake_case_   ,    ):

    '''simple docstring'''







    super().__init__(**snake_case_					)

    __UpperCAmelCase:					Tuple		= image_size
    __UpperCAmelCase:					List[Any]		= patch_size
    __UpperCAmelCase:					Optional[Any]		= num_channels
    __UpperCAmelCase:					int		= num_frames

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

    __UpperCAmelCase:					str		= attention_type
    __UpperCAmelCase:					Tuple		= drop_path_rate