



def     UpperCAmelCase_		(					snake_case__					)	->     set:



				"""simple docstring"""





				lowerCAmelCase__		  =  set()
				# edges = list of graph's edges
				lowerCAmelCase__		  =  get_edges(snake_case__					)

				# While there are still elements in edges list, take an arbitrary edge
				# (from_node, to_node) and add his extremity to chosen_vertices and then
				# remove all arcs adjacent to the from_node and to_node
				while edges:
								lowerCAmelCase__  ,   lowerCAmelCase__		  =  edges.pop()
								chosen_vertices.add(snake_case__					)
								chosen_vertices.add(snake_case__					)
								for edge in edges.copy():
												if from_node in edge or to_node in edge:
																edges.discard(snake_case__					)
				return chosen_vertices







def     UpperCAmelCase_		(					snake_case__					)	->     set:



				"""simple docstring"""





				lowerCAmelCase__		  =  set()
				for from_node, to_nodes in graph.items():
								for to_node in to_nodes:
												edges.add((from_node, to_node)					)
				return edges


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	# graph = {0: [1, 3], 1: [0, 3], 2: [0, 3, 4], 3: [0, 1, 2], 4: [2, 3]}
	# print(f"Matching vertex cover:\n{matching_min_vertex_cover(graph)}")





import random
from typing import Any







def     UpperCAmelCase_		(					snake_case__					)	->     list[Any]:



				"""simple docstring"""





				for _ in range(len(snake_case__					)					):
								lowerCAmelCase__		  =  random.randint(0    ,			len(snake_case__					) - 1					)
								lowerCAmelCase__		  =  random.randint(0    ,			len(snake_case__					) - 1					)
								lowerCAmelCase__  ,   lowerCAmelCase__		  =  data[b], data[a]
				return data


if __name__ == "__main__":
	_lowerCAmelCase	:   int    =   [0, 1, 2, 3, 4, 5, 6, 7]
	_lowerCAmelCase	:   Optional[Any]    =   ["python", "says", "hello", "!"]
	print("Fisher-Yates Shuffle:")
	print("List", integers, strings)
	print("FY Shuffle", fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))
