



import importlib.metadata
from typing import Union

from packaging.version import Version, parse

from .constants import STR_OPERATION_TO_FUNC


_snake_case	=						parse(importlib.metadata.version("torch"))






def        A       (      _lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							if operation not in STR_OPERATION_TO_FUNC.keys():
														raise ValueError(F"`operation` must be one of {list(STR_OPERATION_TO_FUNC.keys()						)}, received {operation}"						)
							_lowerCAmelCase  :							List[str]				     =					STR_OPERATION_TO_FUNC[operation]
							if isinstance(_lowerCamelCase       ,				_lowerCamelCase						):
														_lowerCAmelCase  :							str				     =					parse(importlib.metadata.version(_lowerCamelCase						)						)
							return operation(_lowerCamelCase       ,				parse(_lowerCamelCase						)						)






def        A       (      _lowerCamelCase       ,				_lowerCamelCase						):





							'''simple docstring'''




							return compare_versions(_lowerCamelCase       ,				_lowerCamelCase       ,				_lowerCamelCase						)





def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							_lowerCAmelCase  :							int				     =					len(_lowerCamelCase						)
							for i in range(1       ,				_lowerCamelCase						):
														_lowerCAmelCase  :							List[Any]				     =					collection[i]
														_lowerCAmelCase  :							str				     =					0
														_lowerCAmelCase  :							Union[str, Any]				     =					i - 1

														while low <= high:
																					_lowerCAmelCase  :							List[str]				     =					(low + high) // 2
																					if val < collection[mid]:
																												_lowerCAmelCase  :							Optional[int]				     =					mid - 1
																					else:
																												_lowerCAmelCase  :							List[str]				     =					mid + 1
														for j in range(_lowerCamelCase       ,				_lowerCamelCase       ,				-1						):
																					_lowerCAmelCase  :							int				     =					collection[j - 1]
														_lowerCAmelCase  :							Optional[int]				     =					val
							return collection


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