

'''simple docstring'''
import copy

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


_UpperCAmelCase  :		Optional[Any]  =		logging.get_logger(__name__)

class 						__magic_name__   (							__SCREAMING_SNAKE_CASE ):
 UpperCamelCase__     =       'encoder-decoder'
 UpperCamelCase__     =       True







 def __init__(       self  , **snake_case_   ):
   super().__init__(**snake_case_   )
   assert (
       "encoder" in kwargs and "decoder" in kwargs
   ), "Config has to be initialized with encoder and decoder config"
   lowercase									=kwargs.pop('''encoder'''   )
   lowercase									=encoder_config.pop('''model_type'''   )
   lowercase									=kwargs.pop('''decoder'''   )
   lowercase									=decoder_config.pop('''model_type'''   )

   from ..auto.configuration_auto import AutoConfig

   lowercase									=AutoConfig.for_model(snake_case_  , **snake_case_   )
   lowercase									=AutoConfig.for_model(snake_case_  , **snake_case_   )
   lowercase									=True







 @classmethod
 def 						_A(       cls  , snake_case_  , snake_case_  , **snake_case_   ):
   logger.info('''Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config'''   )
   lowercase									=True
   lowercase									=True

   return cls(encoder=encoder_config.to_dict()  , decoder=decoder_config.to_dict()  , **snake_case_   )







 def 						_A(       self   ):
   lowercase									=copy.deepcopy(self.__dict__   )
   lowercase									=self.encoder.to_dict()
   lowercase									=self.decoder.to_dict()
   lowercase									=self.__class__.model_type
   return output




'''simple docstring'''


from __future__ import annotations







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if len(SCREAMING_SNAKE_CASE__	) <= 1 or n <= 1:
								return

				insert_next(SCREAMING_SNAKE_CASE__				, n - 1	)
				rec_insertion_sort(SCREAMING_SNAKE_CASE__				, n - 1	)







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if index >= len(SCREAMING_SNAKE_CASE__	) or collection[index - 1] <= collection[index]:
								return

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

				insert_next(SCREAMING_SNAKE_CASE__				, index + 1	)


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




