



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


__lowerCamelCase			       =			logging.get_logger(__name__)

__lowerCamelCase			       =			{
    "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   snake_case_ (_UpperCAmelCase  ):




       """simple docstring"""






       _lowerCamelCase			    =				"""vivit"""



       def __init__(     self     ,lowercase=224     ,lowercase=32     ,lowercase=[2, 16, 16]     ,lowercase=3     ,lowercase=768     ,lowercase=12     ,lowercase=12     ,lowercase=3072     ,lowercase="gelu_fast"     ,lowercase=0.0     ,lowercase=0.0     ,lowercase=0.02     ,lowercase=1E-06     ,lowercase=True     ,**lowercase     ,):

             """simple docstring"""





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

             UpperCAmelCase_  :	Union[str, Any]				      =		image_size
             UpperCAmelCase_  :	Tuple				      =		num_frames
             UpperCAmelCase_  :	Tuple				      =		tubelet_size
             UpperCAmelCase_  :	Union[str, Any]				      =		num_channels
             UpperCAmelCase_  :	str				      =		qkv_bias

             super().__init__(**lowercase_)





import operator







def    _snake_case (       __snake_case					,  __snake_case = False					,  __snake_case = None    )     ->     list:






      '''simple docstring'''







      UpperCAmelCase_  :	Optional[int]				      =		operator.lt if reverse else operator.gt
      UpperCAmelCase_  :	int				      =		solution or []

      if not arr:
            return solution

      UpperCAmelCase_  :	Union[str, Any]				      =		[arr.pop(0    )]
      for i, item in enumerate(__snake_case    ):
            if _operator(__snake_case					,  sublist[-1]    ):
                  sublist.append(__snake_case    )
                  arr.pop(__snake_case    )

    #  merging sublist into solution list
      if not solution:
            solution.extend(__snake_case    )
      else:
            while sublist:
                  UpperCAmelCase_  :	Optional[int]				      =		sublist.pop(0    )
                  for i, xx in enumerate(__snake_case    ):
                        if not _operator(__snake_case					,  __snake_case    ):
                              solution.insert(__snake_case					,  __snake_case    )
                              break
                  else:
                        solution.append(__snake_case    )

      strand_sort(__snake_case					,  __snake_case					,  __snake_case    )
      return solution


if __name__ == "__main__":
   assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
   assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]
