

__snake_case							:			str      		= {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

__snake_case							:			List[Any]      		= {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}


def 				_UpperCAmelCase							(	a__     ,  a__     ,  a__):

			'''simple docstring'''



			a_	:	Optional[int]          =   True
			a_	:	Union[str, Any]          =   []

			for neighbour in graph[vert]:
						if not visited[neighbour]:
									connected_verts += dfs(a__     ,  a__     ,  a__)

			return [vert, *connected_verts]


def 				_UpperCAmelCase							(	a__):

			'''simple docstring'''



			a_	:	Any          =   len(a__)
			a_	:	int          =   graph_size * [False]
			a_	:	List[str]          =   []

			for i in range(a__):
						if not visited[i]:
									a_	:	List[str]          =   dfs(a__     ,  a__     ,  a__)
									components_list.append(a__)

			return components_list


if __name__ == "__main__":
	import doctest

	doctest.testmod()





from cva import destroyAllWindows, imread, imshow, waitKey


def 				_UpperCAmelCase							(	a__     ,  a__):

			'''simple docstring'''



			a_       ,				a_	:	Optional[int]          =   img.shape[0], img.shape[1]

			def to_grayscale(a__     ,  a__     ,  a__):
						return 0.2126 * red + 0.587 * green + 0.114 * blue

			def normalize(a__):
						return min(a__     ,  2_5_5)

			for i in range(a__):
						for j in range(a__):
									a_	:	Optional[Any]          =   int(to_grayscale(*img[i][j]))
									a_	:	Union[str, Any]          =   [
									    normalize(a__),
									    normalize(greyscale + factor),
									    normalize(greyscale + 2 * factor),
									]

			return img


if __name__ == "__main__":
	# read original image
	__snake_case							:			Dict      		= {
	    percentage: imread("""image_data/lena.jpg""", 1) for percentage in (10, 20, 30, 40)
	}

	for percentage, img in images.items():
		make_sepia(img, percentage)

	for percentage, img in images.items():
		imshow(F"""Original image with sepia (factor: {percentage})""", img)

	waitKey(0)
	destroyAllWindows()


