"""simple docstring"""
from __future__ import annotations





def 				lowerCAmelCase__      (     _UpperCamelCase    :			Union[str, Any]	,     _UpperCamelCase    :			List[Any]   )   ->			Dict:





						"""simple docstring"""






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

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





def 				lowerCAmelCase__      (     _UpperCamelCase    :			Optional[Any]	,     _UpperCamelCase    :			List[str]   )   ->			Tuple:





						"""simple docstring"""






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

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

						insert_next(_UpperCamelCase	,     index + 1   )


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



"""simple docstring"""
import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu



@require_cpu
class 					lowerCAmelCase_      (     unittest.TestCase   ):



				"""simple docstring"""

				def 						snake_case	(			self      ):






										"""simple docstring"""

										snake_case        =     torch.nn.Linear(10						,      10      )
										snake_case        =     torch.optim.SGD(model.parameters()						,      0.1      )
										snake_case        =     Accelerator()
										snake_case        =     accelerator.prepare(lowerCAmelCase      )
										try:
																pickle.loads(pickle.dumps(lowerCAmelCase      )      )
										except Exception as e:
																self.fail(F"""Accelerated optimizer pickling failed with {e}"""      )
										AcceleratorState._reset_state()


