





from PIL import Image



def 						A_							(	_lowerCAmelCase				,  _lowerCAmelCase	)		->					Image:

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

 if not -255.0 <= level <= 255.0:
  raise ValueError("level must be between -255.0 (black) and 255.0 (white)"	)
 return img.point(_lowerCAmelCase	)


if __name__ == "__main__":
    # Load image
    with Image.open("""image_data/lena.jpg""") as img:
        # Change brightness to 100
        __lowerCamelCase			:	List[str]					    =	change_brightness(img, 100)
        brigt_img.save("""image_data/lena_brightness.png""", format="""png""")







from typing import Any



def 						A_							(	_lowerCAmelCase	)		->					list[Any]:
 if not input_list:
  return []
 UpperCamelCase      :   List[str]			      =  [input_list.count(_lowerCAmelCase	) for value in input_list]
 UpperCamelCase      :   Dict			      =  max(_lowerCAmelCase	)  # Gets the maximum count in the input list.
 # Gets values of modes
 return sorted({input_list[i] for i, value in enumerate(_lowerCAmelCase	) if value == y}	)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
