


'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase_						:  Union[str, Any]				  =						{
    'configuration_nllb_moe': [
        'NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'NllbMoeConfig',
    ]
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCAmelCase_						:  Optional[Any]				  =						[
				    'NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'NllbMoeForConditionalGeneration',
				    'NllbMoeModel',
				    'NllbMoePreTrainedModel',
				    'NllbMoeTop2Router',
				    'NllbMoeSparseMLP',
				]


if TYPE_CHECKING:
				from .configuration_nllb_moe import (
				    NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    NllbMoeConfig,
				)

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_nllb_moe import (
								    NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
								    NllbMoeForConditionalGeneration,
								    NllbMoeModel,
								    NllbMoePreTrainedModel,
								    NllbMoeSparseMLP,
								    NllbMoeTopaRouter,
								)


else:
				import sys

				UpperCAmelCase_						:  Tuple				  =						_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)








'''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)




