





'''simple docstring'''







def 		SCREAMING_SNAKE_CASE      (					lowerCAmelCase__     :	list)			->						list:

     '''simple docstring'''




     for insert_index, insert_value in enumerate(collection[1:]):
          _lowercase							:      Dict  						=							insert_index
          while insert_index >= 0 and insert_value < collection[insert_index]:
               _lowercase							:      Any  						=							collection[insert_index]
               insert_index -= 1
          if insert_index != temp_index:
               _lowercase							:      Tuple  						=							insert_value
     return collection


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

    testmod()

    A						    =							input('''Enter numbers separated by a comma:\n''').strip()
    A						    =							[int(item) for item in user_input.split(''',''')]
    print(F"""{insertion_sort(unsorted) = }""")






'''simple docstring'''







import copy

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


A						    =							logging.get_logger(__name__)

A						    =							{
    '''facebook/sam-vit-huge''': '''https://huggingface.co/facebook/sam-vit-huge/resolve/main/config.json''',
    '''facebook/sam-vit-large''': '''https://huggingface.co/facebook/sam-vit-large/resolve/main/config.json''',
    '''facebook/sam-vit-base''': '''https://huggingface.co/facebook/sam-vit-base/resolve/main/config.json''',
}



class 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      def __init__(							self    : Union[str, Any]   ,UpperCamelCase    : Tuple=256   ,UpperCamelCase    : Union[str, Any]=1024   ,UpperCamelCase    : Any=16   ,UpperCamelCase    : List[str]=16   ,UpperCamelCase    : List[str]=4   ,UpperCamelCase    : Dict="gelu"   ,UpperCamelCase    : Any=1e-6   ,**UpperCamelCase    : List[Any]   ,)		->  str:
           super().__init__(**UpperCamelCase  )
           _lowercase							:      int  						=							hidden_size
           _lowercase							:      List[str]  						=							image_size
           _lowercase							:      Optional[Any]  						=							patch_size
           _lowercase							:      Any  						=							image_size // patch_size
           _lowercase							:      str  						=							mask_input_channels
           _lowercase							:      Optional[Any]  						=							num_point_embeddings
           _lowercase							:      Dict  						=							hidden_act
           _lowercase							:      int  						=							layer_norm_eps



class 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      def __init__(							self    : Any   ,UpperCamelCase    : Any=256   ,UpperCamelCase    : Any="relu"   ,UpperCamelCase    : Dict=2048   ,UpperCamelCase    : Dict=2   ,UpperCamelCase    : List[str]=8   ,UpperCamelCase    : int=2   ,UpperCamelCase    : List[Any]=3   ,UpperCamelCase    : Any=3   ,UpperCamelCase    : Any=256   ,UpperCamelCase    : Any=1e-6   ,**UpperCamelCase    : Union[str, Any]   ,)		->  Tuple:
           super().__init__(**UpperCamelCase  )
           _lowercase							:      str  						=							hidden_size
           _lowercase							:      Union[str, Any]  						=							hidden_act
           _lowercase							:      Optional[Any]  						=							mlp_dim
           _lowercase							:      Tuple  						=							num_hidden_layers
           _lowercase							:      Tuple  						=							num_attention_heads
           _lowercase							:      List[Any]  						=							attention_downsample_rate
           _lowercase							:      Optional[Any]  						=							num_multimask_outputs
           _lowercase							:      List[str]  						=							iou_head_depth
           _lowercase							:      List[str]  						=							iou_head_hidden_dim
           _lowercase							:      Union[str, Any]  						=							layer_norm_eps



class 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      def __init__(							self    : Optional[Any]   ,UpperCamelCase    : int=768   ,UpperCamelCase    : str=256   ,UpperCamelCase    : str=12   ,UpperCamelCase    : int=12   ,UpperCamelCase    : Optional[int]=3   ,UpperCamelCase    : str=1024   ,UpperCamelCase    : Dict=16   ,UpperCamelCase    : Tuple="gelu"   ,UpperCamelCase    : List[str]=1e-06   ,UpperCamelCase    : List[str]=0.0   ,UpperCamelCase    : int=1e-10   ,UpperCamelCase    : List[Any]=True   ,UpperCamelCase    : Optional[int]=4.0   ,UpperCamelCase    : List[Any]=True   ,UpperCamelCase    : Optional[int]=True   ,UpperCamelCase    : Tuple=14   ,UpperCamelCase    : Tuple=[2, 5, 8, 11]   ,UpperCamelCase    : List[str]=128   ,UpperCamelCase    : List[Any]=None   ,**UpperCamelCase    : List[str]   ,)		->  Optional[int]:
           super().__init__(**UpperCamelCase  )

           _lowercase							:      Optional[int]  						=							hidden_size
           _lowercase							:      List[Any]  						=							output_channels
           _lowercase							:      List[Any]  						=							num_hidden_layers
           _lowercase							:      Tuple  						=							num_attention_heads
           _lowercase							:      Union[str, Any]  						=							num_channels
           _lowercase							:      Optional[Any]  						=							image_size
           _lowercase							:      List[str]  						=							patch_size
           _lowercase							:      List[Any]  						=							hidden_act
           _lowercase							:      Dict  						=							layer_norm_eps
           _lowercase							:      List[str]  						=							attention_dropout
           _lowercase							:      Union[str, Any]  						=							initializer_range
           _lowercase							:      Any  						=							qkv_bias
           _lowercase							:      Dict  						=							mlp_ratio
           _lowercase							:      Optional[int]  						=							use_abs_pos
           _lowercase							:      int  						=							use_rel_pos
           _lowercase							:      Dict  						=							window_size
           _lowercase							:      Dict  						=							global_attn_indexes
           _lowercase							:      str  						=							num_pos_feats
           _lowercase							:      List[Any]  						=							int(hidden_size * mlp_ratio  ) if mlp_dim is None else mlp_dim



class 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      lowerCAmelCase__       :      Any 		=		"sam"
      lowerCAmelCase__       :      Optional[int] 		=		True

      def __init__(							self    : Optional[Any]   ,UpperCamelCase    : Optional[int]=None   ,UpperCamelCase    : List[str]=None   ,UpperCamelCase    : List[Any]=None   ,UpperCamelCase    : int=0.0_2   ,**UpperCamelCase    : Any   ,)		->  Tuple:
           super().__init__(**UpperCamelCase  )
           _lowercase							:      str  						=							vision_config if vision_config is not None else {}
           _lowercase							:      int  						=							prompt_encoder_config if prompt_encoder_config is not None else {}
           _lowercase							:      List[Any]  						=							mask_decoder_config if mask_decoder_config is not None else {}

           if isinstance(UpperCamelCase   ,UpperCamelCase  ):
                _lowercase							:      Optional[Any]  						=							vision_config.to_dict()
           if isinstance(UpperCamelCase   ,UpperCamelCase  ):
                _lowercase							:      Union[str, Any]  						=							prompt_encoder_config.to_dict()
           if isinstance(UpperCamelCase   ,UpperCamelCase  ):
                _lowercase							:      List[Any]  						=							mask_decoder_config.to_dict()

           _lowercase							:      Optional[int]  						=							SamVisionConfig(**UpperCamelCase  )
           _lowercase							:      Union[str, Any]  						=							SamPromptEncoderConfig(**UpperCamelCase  )
           _lowercase							:      Union[str, Any]  						=							SamMaskDecoderConfig(**UpperCamelCase  )
           _lowercase							:      Tuple  						=							initializer_range



      def   _lowerCamelCase		(							self    : List[str]  )		->  Optional[int]:
           _lowercase							:      List[Any]  						=							copy.deepcopy(self.__dict__  )
           _lowercase							:      Any  						=							self.vision_config.to_dict()
           _lowercase							:      Dict  						=							self.prompt_encoder_config.to_dict()
           _lowercase							:      Union[str, Any]  						=							self.mask_decoder_config.to_dict()
           _lowercase							:      List[Any]  						=							self.__class__.model_type
           return output