
from cva import destroyAllWindows, imread, imshow, waitKey




def 			A_			(					lowercase						, lowercase      )     ->							Any:


     """simple docstring"""







     UpperCAmelCase_						:    Any    					=  img.shape[0], img.shape[1]

     def to_grayscale(lowercase						, lowercase						, lowercase      ):
          return 0.2126 * red + 0.587 * green + 0.114 * blue

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

     for i in range(lowercase      ):
          for j in range(lowercase      ):
               UpperCAmelCase_						:    Dict    					=  int(to_grayscale(*img[i][j]      )      )
               UpperCAmelCase_						:    str    					=  [
                   normalize(lowercase      ),
                   normalize(greyscale + factor      ),
                   normalize(greyscale + 2 * factor      ),
               ]

     return img


if __name__ == "__main__":
       # read original image
       lowercase_						    =					{
           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 			A_			(					lowercase = 99_8001      )     ->							int:


     """simple docstring"""







     for number in range(n - 1						, 9999						, -1      ):
          UpperCAmelCase_						:    Union[str, Any]    					=  str(lowercase      )

          # checks whether 'str_number' is a palindrome.
          if str_number == str_number[::-1]:
               UpperCAmelCase_						:    List[str]    					=  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() = }""")

