





from PIL import Image



def 	_a						(   UpperCAmelCase      ,  UpperCAmelCase					)    ->    Image:







   """simple docstring"""

   def brightness(UpperCAmelCase					) -> float:
      return 128 + level + (c - 128)

   if not -2_55.0 <= level <= 2_55.0:
      raise ValueError('''level must be between -255.0 (black) and 255.0 (white)'''					)
   return img.point(UpperCAmelCase					)


if __name__ == "__main__":
       # Load image
       with Image.open('image_data/lena.jpg') as img:
              # Change brightness to 100
              _A :   Optional[Any]  			=  change_brightness(img, 1_00)
              brigt_img.save('image_data/lena_brightness.png', format='png')










def 	_a						(   UpperCAmelCase					)    ->    int:







   """simple docstring"""

   if not isinstance(UpperCAmelCase      ,  UpperCAmelCase					):
      raise TypeError('''only integers accepted as input'''					)
   else:
      lowerCamelCase__       :						Any        =							str(abs(UpperCAmelCase					)					)
      lowerCamelCase__       :						Union[str, Any]        =							[list(UpperCAmelCase					) for char in range(len(UpperCAmelCase					)					)]
      for index in range(len(UpperCAmelCase					)					):
         num_transpositions[index].pop(UpperCAmelCase					)
      return max(
          int(''''''.join(list(UpperCAmelCase					)					)					) for transposition in num_transpositions					)


if __name__ == "__main__":
       __import__('doctest').testmod()



