



from cva import destroyAllWindows, imread, imshow, waitKey

def       A_   (						__a  :					Optional[int]			,		__a  :					int		):

				"""simple docstring"""
				a__   ,      a__					   =		img.shape[0], img.shape[1]

				def to_grayscale(__a  :					Optional[Any]			,		__a  :					List[Any]			,		__a  :					Any		):
								return 0.2_1_2_6 * red + 0.5_8_7 * green + 0.1_1_4 * blue

				def normalize(__a  :					List[Any]		):
								return min(__a			,		255		)

				for i in range(__a		):
								for j in range(__a		):
												a__					   =		int(to_grayscale(*img[i][j]		)		)
												a__					   =		[
												    normalize(__a		),
												    normalize(greyscale + factor		),
												    normalize(greyscale + 2 * factor		),
												]

				return img


if __name__ == "__main__":
	# read original image
	UpperCAmelCase							=       {
	    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()






"""simple docstring"""






def 	snake_case__  (						__lowerCamelCase							:       int = 998001      ):
			"""simple docstring"""

			# fetches the next number
			for number in range(n - 1				,						9999				,						-1      ):
						lowerCamelCase__						:						Optional[int]						      =str(__lowerCamelCase      )

						# checks whether 'str_number' is a palindrome.
						if str_number == str_number[::-1]:
									lowerCamelCase__						:						Optional[int]						      =999

									# if 'number' is a product of two 3-digit numbers
									# then number is the answer otherwise fetch next number.
									while divisor != 99:
												if (number % divisor == 0) and (len(str(number // divisor      )      ) == 3.0):
															return number
												divisor -= 1
			raise ValueError('''That number is larger than our acceptable range.'''      )


if __name__ == "__main__":
		print(f'{solution() = }')




