



"""simple docstring"""
def 				lowerCAmelCase_(      lowercase_   :							list							)		->				list:

				for insert_index, insert_value in enumerate(collection[1:]							):
								_lowerCamelCase					     = insert_index
								while insert_index >= 0 and insert_value < collection[insert_index]:
												_lowerCamelCase					     = collection[insert_index]
												insert_index -= 1
								if insert_index != temp_index:
												_lowerCamelCase					     = insert_value
				return collection


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

			testmod()

			__SCREAMING_SNAKE_CASE     :  Union[str, Any]										=					input('''Enter numbers separated by a comma:\n''').strip()
			__SCREAMING_SNAKE_CASE     :  Union[str, Any]										=					[int(item) for item in user_input.split(''',''')]
			print(F"""{insertion_sort(unsorted) = }""")








"""simple docstring"""
from cva import destroyAllWindows, imread, imshow, waitKey






def        lowerCamelCase_  (						_lowerCamelCase			,   _lowerCamelCase				):
 lowerCamelCase__				,     lowerCamelCase__     :			Optional[Any]     				=						img.shape[0], img.shape[1]

 def to_grayscale(_lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase				):
  return 0.2_126 * red + 0.587 * green + 0.114 * blue

 def normalize(_lowerCamelCase				):
  return min(_lowerCamelCase			,   255				)

 for i in range(_lowerCamelCase				):
  for j in range(_lowerCamelCase				):
   lowerCamelCase__     :			List[Any]     				=						int(to_grayscale(*img[i][j]				)				)
   lowerCamelCase__     :			Optional[int]     				=						[
       normalize(_lowerCamelCase				),
       normalize(greyscale + factor				),
       normalize(greyscale + 2 * factor				),
   ]

 return img


if __name__ == "__main__":
      # read original image
      A_			: List[str]				=			{
          percentage: imread("image_data/lena.jpg", 1) for percentage in (10, 20, 30, 40)
      }

      for percentage, img in images.items():
            make_sepia(img, percentage)

      for percentage, img in images.items():
            imshow(f"Original image with sepia (factor: {percentage})", img)

      waitKey(0)
      destroyAllWindows()

