





def       _A  (      lowerCamelCase   ):
   if not all(char in "01" for char in bin_string   ):
      raise ValueError("Non-binary value was passed to the function"   )
   if not bin_string:
      raise ValueError("Empty string was passed to the function"   )
   a__	:						Tuple      		=  ""
   while len(lowerCamelCase   ) % 3 != 0:
      a__	:						List[str]      		=  "0" + bin_string
   a__	:						List[Any]      		=  [
       bin_string[index : index + 3]
       for index in range(len(lowerCamelCase   )   )
       if index % 3 == 0
   ]
   for bin_group in bin_string_in_3_list:
      a__	:						Dict      		=  0
      for index, val in enumerate(lowerCamelCase   ):
         oct_val += int(2 ** (2 - index) * int(lowerCamelCase   )   )
      oct_string += str(lowerCamelCase   )
   return oct_string


if __name__ == "__main__":
  from doctest import testmod

  testmod()








from PIL import Image






def       _A  (      lowerCamelCase							, lowerCamelCase   ):

   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
    SCREAMING_SNAKE_CASE__       :			List[str]			      =						change_brightness(img, 1_0_0)
    brigt_img.save("""image_data/lena_brightness.png""", format="""png""")

