

from PIL import Image

def 			lowerCamelCase__			(       _a				,      _a):
	SCREAMING_SNAKE_CASE :   List[Any]					  =							(259 * (level + 255)) / (255 * (259 - level))

	def contrast(_a) -> int:
		return int(128 + factor * (c - 128))

	return img.point(_a)


if __name__ == "__main__":
			# Load image
			with Image.open('image_data/lena.jpg') as img:
						# Change contrast to 170
						a_      =     change_contrast(img, 170)
						cont_img.save('image_data/lena_high_contrast.png', format='png')


from __future__ import annotations

def 			lowerCamelCase__			(       _a):
	if len(_a) == 0:
		return []
	SCREAMING_SNAKE_CASE  ,SCREAMING_SNAKE_CASE :   Tuple					  =							min(_a), max(_a)
	SCREAMING_SNAKE_CASE :   Dict					  =							int(max_value - min_value) + 1
	SCREAMING_SNAKE_CASE :   list[list]					  =							[[] for _ in range(_a)]

	for i in my_list:
		buckets[int(i - min_value)].append(_a)

	return [v for bucket in buckets for v in sorted(_a)]


if __name__ == "__main__":
			from doctest import testmod

			testmod()
			assert bucket_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
			assert bucket_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]