




"""simple docstring"""




from __future__ import annotations



def 					a__				(       snake_case__ ,				snake_case__       )		->      List[str]:
			# Checks if the entire collection has been sorted
			if len(snake_case__       ) <= 1 or n <= 1:
						return

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



def 					a__				(       snake_case__ ,				snake_case__       )		->      Optional[int]:
			# Checks order between adjacent elements
			if index >= len(snake_case__       ) or collection[index - 1] <= collection[index]:
						return

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

			insert_next(snake_case__ ,				index + 1       )


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









"""simple docstring"""




import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


lowerCAmelCase							:    Optional[Any]  							=							"""sshleifer/bart-tiny-random"""
lowerCAmelCase							:    List[Any]  							=							"""patrickvonplaten/t5-tiny-random"""






@require_torch
class 					__magic_name__							( unittest.TestCase       ):






				'''simple docstring'''





				@cached_property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return AutoConfig.from_pretrained(_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.num_hidden_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				self.teacher_config.encoder_layers				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							with self.assertRaises(_a				):
										create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=_a	,				d=_a				)



