


from cva import destroyAllWindows, imread, imshow, waitKey







def     __magic_name__  (      lowerCAmelCase_      ,					lowerCAmelCase_):
	'''simple docstring'''


	lowerCamelCase_   ,lowerCamelCase_			:							Optional[Any]      =       img.shape[0], img.shape[1]

	def to_grayscale(lowerCAmelCase_      ,					lowerCAmelCase_      ,					lowerCAmelCase_):
		return 0.21_26 * red + 0.5_87 * green + 0.1_14 * blue

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

	for i in range(lowerCAmelCase_):
		for j in range(lowerCAmelCase_):
			lowerCamelCase_			:							Optional[int]      =       int(to_grayscale(*img[i][j]))
			lowerCamelCase_			:							str      =       [
			    normalize(lowerCAmelCase_),
			    normalize(greyscale + factor),
			    normalize(greyscale + 2 * factor),
			]

	return img


if __name__ == "__main__":
							# read original image
							__magic_name__       					=      {
							    percentage: imread('''image_data/lena.jpg''', 1) for percentage in (1_0, 2_0, 3_0, 4_0)
							}

							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()





def     __magic_name__  (      lowerCAmelCase_      ,					lowerCAmelCase_):
	'''simple docstring'''


	lowerCamelCase_			:							Union[str, Any]      =       0
	for ele in arr:
		total_sum += product_sum(lowerCAmelCase_      ,					depth + 1) if isinstance(lowerCAmelCase_      ,					lowerCAmelCase_) else ele
	return total_sum * depth







def     __magic_name__  (      lowerCAmelCase_):
	'''simple docstring'''


	return product_sum(lowerCAmelCase_      ,					1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()

