


import copy
import os
from typing import Union

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


__a	 =      logging.get_logger(__name__)

__a	 =      {
    """microsoft/git-base""": """https://huggingface.co/microsoft/git-base/resolve/main/config.json""",
}






class 	__lowercase					(	__snake_case	):
      UpperCamelCase										=							'''git_vision_model'''





      def __init__(		self    :       int       ,							__lowerCamelCase    :       Tuple=7_6_8       ,							__lowerCamelCase    :       Any=3_0_7_2       ,							__lowerCamelCase    :       Union[str, Any]=1_2       ,							__lowerCamelCase    :       List[str]=1_2       ,							__lowerCamelCase    :       List[str]=3       ,							__lowerCamelCase    :       str=2_2_4       ,							__lowerCamelCase    :       str=1_6       ,							__lowerCamelCase    :       int="quick_gelu"       ,							__lowerCamelCase    :       Optional[int]=1e-5       ,							__lowerCamelCase    :       Optional[Any]=0.0       ,							__lowerCamelCase    :       Any=0.02       ,							**__lowerCamelCase    :       Tuple       ,							)     -> Union[str, Any]:






         """simple docstring"""







         super().__init__(**__lowerCamelCase							)

         UpperCAmelCase      					=  hidden_size
         UpperCAmelCase      					=  intermediate_size
         UpperCAmelCase      					=  num_hidden_layers
         UpperCAmelCase      					=  num_attention_heads
         UpperCAmelCase      					=  num_channels
         UpperCAmelCase      					=  patch_size
         UpperCAmelCase      					=  image_size
         UpperCAmelCase      					=  initializer_range
         UpperCAmelCase      					=  attention_dropout
         UpperCAmelCase      					=  layer_norm_eps
         UpperCAmelCase      					=  hidden_act





      @classmethod
      def 							_lowercase					(		cls    :       List[str]       ,							__lowerCamelCase    :       Union[str, os.PathLike]       ,							**__lowerCamelCase    :       str							)     -> "PretrainedConfig":






         """simple docstring"""







         cls._set_token_in_kwargs(__lowerCamelCase							)

         UpperCAmelCase					,	UpperCAmelCase      					=  cls.get_config_dict(__lowerCamelCase       ,							**__lowerCamelCase							)

         # get the vision config dict if we are loading from GITConfig
         if config_dict.get("""model_type"""							) == "git":
            UpperCAmelCase      					=  config_dict["""vision_config"""]

         if "model_type" in config_dict and hasattr(cls       ,							"""model_type"""							) and config_dict["model_type"] != cls.model_type:
            logger.warning(
                F"""You are using a model of type {config_dict['model_type']} to instantiate a model of type """
                F"""{cls.model_type}. This is not supported for all configurations of models and can yield errors."""							)

         return cls.from_dict(__lowerCamelCase       ,							**__lowerCamelCase							)






class 	__lowercase					(	__snake_case	):
      UpperCamelCase										=							'''git'''





      def __init__(		self    :       Union[str, Any]       ,							__lowerCamelCase    :       List[Any]=None       ,							__lowerCamelCase    :       Optional[Any]=3_0_5_2_2       ,							__lowerCamelCase    :       int=7_6_8       ,							__lowerCamelCase    :       Any=6       ,							__lowerCamelCase    :       Optional[Any]=1_2       ,							__lowerCamelCase    :       int=3_0_7_2       ,							__lowerCamelCase    :       Dict="gelu"       ,							__lowerCamelCase    :       List[Any]=0.1       ,							__lowerCamelCase    :       Optional[int]=0.1       ,							__lowerCamelCase    :       Union[str, Any]=1_0_2_4       ,							__lowerCamelCase    :       Any=0.02       ,							__lowerCamelCase    :       List[Any]=1e-1_2       ,							__lowerCamelCase    :       Union[str, Any]=0       ,							__lowerCamelCase    :       Optional[int]="absolute"       ,							__lowerCamelCase    :       int=True       ,							__lowerCamelCase    :       Any=False       ,							__lowerCamelCase    :       List[str]=1_0_1       ,							__lowerCamelCase    :       Optional[Any]=1_0_2       ,							__lowerCamelCase    :       Any=None       ,							**__lowerCamelCase    :       Any       ,							)     -> Optional[int]:






         """simple docstring"""







         super().__init__(bos_token_id=__lowerCamelCase       ,							eos_token_id=__lowerCamelCase       ,							pad_token_id=__lowerCamelCase       ,							**__lowerCamelCase							)

         if vision_config is None:
            UpperCAmelCase      					=  {}
            logger.info("""vision_config is None. initializing the GitVisionConfig with default values."""							)

         UpperCAmelCase      					=  GitVisionConfig(**__lowerCamelCase							)
         UpperCAmelCase      					=  vocab_size
         UpperCAmelCase      					=  hidden_size
         UpperCAmelCase      					=  num_hidden_layers
         UpperCAmelCase      					=  num_attention_heads
         UpperCAmelCase      					=  hidden_act
         UpperCAmelCase      					=  intermediate_size
         UpperCAmelCase      					=  hidden_dropout_prob
         UpperCAmelCase      					=  attention_probs_dropout_prob
         UpperCAmelCase      					=  max_position_embeddings
         UpperCAmelCase      					=  initializer_range
         UpperCAmelCase      					=  layer_norm_eps
         UpperCAmelCase      					=  position_embedding_type
         UpperCAmelCase      					=  use_cache
         UpperCAmelCase      					=  tie_word_embeddings
         UpperCAmelCase      					=  num_image_with_embedding

         UpperCAmelCase      					=  bos_token_id
         UpperCAmelCase      					=  eos_token_id





      def 							_lowercase					(		self    :       Optional[Any]							)     -> Dict:






         """simple docstring"""







         UpperCAmelCase      					=  copy.deepcopy(self.__dict__							)
         UpperCAmelCase      					=  self.vision_config.to_dict()
         UpperCAmelCase      					=  self.__class__.model_type
         return output







from __future__ import annotations
def 	_UpperCamelCase					(    lowerCAmelCase_	,    lowerCAmelCase_ )    ->Optional[int]:
   # Checks if the entire collection has been sorted
   if len(lowerCAmelCase_ ) <= 1 or n <= 1:
      return

   insert_next(lowerCAmelCase_	,    n - 1 )
   rec_insertion_sort(lowerCAmelCase_	,    n - 1 )
def 	_UpperCamelCase					(    lowerCAmelCase_	,    lowerCAmelCase_ )    ->Dict:
   # Checks order between adjacent elements
   if index >= len(lowerCAmelCase_ ) or collection[index - 1] <= collection[index]:
      return

   # Swaps adjacent elements since they are not in ascending order
   UpperCAmelCase					,	UpperCAmelCase      					=  (
       collection[index],
       collection[index - 1],
   )

   insert_next(lowerCAmelCase_	,    index + 1 )


if __name__ == "__main__":
 __a	 =      input("""Enter integers separated by spaces: """)
 __a	 =      [int(num) for num in numbers.split()]
 rec_insertion_sort(number_list, len(number_list))
 print(number_list)



