




def 			__magic_name__				( A		:					str,  A		:					int   ):






			'''simple docstring'''







			a    =			[[] for _ in range(A   )]
			a    =			key - 1

			if key <= 0:
						raise ValueError("Height of grid can't be 0 or negative"   )
			if key == 1 or len(A   ) <= key:
						return input_string

			for position, character in enumerate(A   ):
						a    =			position % (lowest * 2)  # puts it in bounds
						a    =			min(A,  lowest * 2 - num   )  # creates zigzag pattern
						temp_grid[num].append(A   )
			a    =			["".join(A   ) for row in temp_grid]
			a    =			"".join(A   )

			return output_string




def 			__magic_name__				( A		:					str,  A		:					int   ):






			'''simple docstring'''







			a    =			[]
			a    =			key - 1

			if key <= 0:
						raise ValueError("Height of grid can't be 0 or negative"   )
			if key == 1:
						return input_string

			a    =			[[] for _ in range(A   )]  # generates template
			for position in range(len(A   )   ):
						a    =			position % (lowest * 2)  # puts it in bounds
						a    =			min(A,  lowest * 2 - num   )  # creates zigzag pattern
						temp_grid[num].append("*"   )

			a    =			0
			for row in temp_grid:  # fills in the characters
						a    =			input_string[counter : counter + len(A   )]
						grid.append(list(A   )   )
						counter += len(A   )

			a    =			""  # reads as zigzag
			for position in range(len(A   )   ):
						a    =			position % (lowest * 2)  # puts it in bounds
						a    =			min(A,  lowest * 2 - num   )  # creates zigzag pattern
						output_string += grid[num][0]
						grid[num].pop(0   )
			return output_string




def 			__magic_name__				( A		:					str   ):






			'''simple docstring'''







			a    =			{}
			for key_guess in range(1,  len(A   )   ):  # tries every key
						a    =			decrypt(A,  A   )
			return results


if __name__ == "__main__":
		import doctest

		doctest.testmod()








from PIL import Image




def 	_SCREAMING_SNAKE_CASE					(		_lowerCamelCase :			Image						,  _lowerCamelCase :			int)					->    Image:






							'''simple docstring'''





							__UpperCamelCase	:   str			   =					(259 * (level + 255)) / (255 * (259 - level))

							def contrast(_lowerCamelCase :			int) -> int:
														return int(128 + factor * (c - 128))

							return img.point(_lowerCamelCase)


if __name__ == "__main__":
		# Load image
		with Image.open('image_data/lena.jpg') as img:
				# Change contrast to 170
				lowercase  :					Tuple													=       change_contrast(img, 170)
				cont_img.save('image_data/lena_high_contrast.png', format='png')