from PIL import Image




def        lowerCAmelCase_			(					__A,  __A							)					->    Image:







      '''simple docstring'''


      UpperCAmelCase__								=  (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
              UpperCamelCase__    							= change_contrast(img, 1_7_0)
              cont_img.save('image_data/lena_high_contrast.png', format='png')




def        lowerCAmelCase_			(					__A							)					->    str:







      '''simple docstring'''


      return " ".join(input_str.split()[::-1]							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()



