




'''simple docstring'''


from __future__ import annotations
def 						snake_case_       (UpperCamelCase			:    list[int] ):





							'''simple docstring'''


							if len(UpperCamelCase ) == 0:
														return array

							_a	,				_a      	=							min(UpperCamelCase ), max(UpperCamelCase )

							# Compute the variables
							_a      	=							_max - _min + 1
							_a	,				_a      	=							[0] * holes_range, [0] * holes_range

							# Make the sorting.
							for i in array:
														_a      	=							i - _min
														_a      	=							i
														holes_repeat[index] += 1

							# Makes the array back by replacing the numbers.
							_a      	=							0
							for i in range(UpperCamelCase ):
														while holes_repeat[i] > 0:
																					_a      	=							holes[i]
																					index += 1
																					holes_repeat[i] -= 1

    # Returns the sorted array.
							return array


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				_snake_case : str  				=						input('Enter numbers separated by comma:\n')
				_snake_case : Union[str, Any]  				=						[int(x) for x in user_input.split(',')]
				print(pigeon_sort(unsorted))







'''simple docstring'''


import PIL.Image
import PIL.ImageOps
from packaging import version
from PIL import Image


if version.parse(version.parse(PIL.__version__).base_version) >= version.parse('9.1.0'):
				_snake_case : Tuple  				=						{
				    'linear': PIL.Image.Resampling.BILINEAR,
				    'bilinear': PIL.Image.Resampling.BILINEAR,
				    'bicubic': PIL.Image.Resampling.BICUBIC,
				    'lanczos': PIL.Image.Resampling.LANCZOS,
				    'nearest': PIL.Image.Resampling.NEAREST,
				}
else:
				_snake_case : Any  				=						{
				    'linear': PIL.Image.LINEAR,
				    'bilinear': PIL.Image.BILINEAR,
				    'bicubic': PIL.Image.BICUBIC,
				    'lanczos': PIL.Image.LANCZOS,
				    'nearest': PIL.Image.NEAREST,
				}
def 						snake_case_       (UpperCamelCase			:    Optional[int] ):





							'''simple docstring'''


							_a      	=							(images / 2 + 0.5).clamp(0					,		1 )
							_a      	=							images.cpu().permute(0					,		2					,		3					,		1 ).float().numpy()
							_a      	=							numpy_to_pil(UpperCamelCase )
							return images

def 						snake_case_       (UpperCamelCase			:    str ):





							'''simple docstring'''


							if images.ndim == 3:
														_a      	=							images[None, ...]
							_a      	=							(images * 255).round().astype('''uint8''' )
							if images.shape[-1] == 1:
														# special case for grayscale (single channel) images
														_a      	=							[Image.fromarray(image.squeeze()					,		mode='''L''' ) for image in images]
							else:
														_a      	=							[Image.fromarray(UpperCamelCase ) for image in images]

							return pil_images

