






import logging
import os

from .state import PartialState



class 							SCREAMING_SNAKE_CASE__		(       logging.LoggerAdapter		):





					"""simple docstring"""






					@staticmethod
					def  _lowercase  (      __A  :						int ):
						snake_case__				:   Any     =						PartialState()
						return not main_process_only or (main_process_only and state.is_main_process)






					def  _lowercase  (      self  :						Optional[Any]							,	__A  :						Dict							,	__A  :						Union[str, Any]							,	*__A  :						List[str]							,	**__A  :						Dict ):






						if PartialState._shared_state == {}:
							raise RuntimeError(
							    "You must initialize the accelerate state by calling either `PartialState()` or `Accelerator()` before using the logging utility." )
						snake_case__				:   List[Any]     =						kwargs.pop("main_process_only"							,	lowerCamelCase__ )
						snake_case__				:   Union[str, Any]     =						kwargs.pop("in_order"							,	lowerCamelCase__ )

						if self.isEnabledFor(lowerCamelCase__ ):
							if self._should_log(lowerCamelCase__ ):
								snake_case__				:   List[str]     =						self.process(lowerCamelCase__							,	lowerCamelCase__ )
								self.logger.log(lowerCamelCase__							,	lowerCamelCase__							,	*lowerCamelCase__							,	**lowerCamelCase__ )

							elif in_order:
								snake_case__				:   int     =						PartialState()
								for i in range(state.num_processes ):
									if i == state.process_index:
										snake_case__				:   int     =						self.process(lowerCamelCase__							,	lowerCamelCase__ )
										self.logger.log(lowerCamelCase__							,	lowerCamelCase__							,	*lowerCamelCase__							,	**lowerCamelCase__ )
									state.wait_for_everyone()







def   SCREAMING_SNAKE_CASE       (				snake_case_      :							str  ,						snake_case_      :							str = None     ):



	if log_level is None:
		snake_case__				:   Tuple     =						os.environ.get("ACCELERATE_LOG_LEVEL"  ,						snake_case_     )
	snake_case__				:   Union[str, Any]     =						logging.getLogger(snake_case_     )
	if log_level is not None:
		logger.setLevel(log_level.upper()     )
		logger.root.setLevel(log_level.upper()     )
	return MultiProcessAdapter(snake_case_  ,						{}     )











def   SCREAMING_SNAKE_CASE       (				snake_case_      :							list     ):
	if len(snake_case_     ) <= 1:
		return lst

	snake_case__				:   List[Any]     =						1

	while i < len(snake_case_     ):
		if lst[i - 1] <= lst[i]:
			i += 1
		else:
			snake_case__,		snake_case__				:   Tuple     =						lst[i], lst[i - 1]
			i -= 1
			if i == 0:
				snake_case__				:   Union[str, Any]     =						1

	return lst


if __name__ == "__main__":
	__lowerCamelCase      :    Dict   		=   input("""Enter numbers separated by a comma:\n""").strip()
	__lowerCamelCase      :    Tuple   		=   [int(item) for item in user_input.split(""",""")]
	print(gnome_sort(unsorted))



