

from datetime import datetime

import matplotlib.pyplot as plt
import torch



def 			_A	(      SCREAMING_SNAKE_CASE      ):
	for param in module.parameters():
		UpperCAmelCase__:	Optional[Any]									= False



def 			_A	(      ):
	UpperCAmelCase__:	Any									= "cuda" if torch.cuda.is_available() else "cpu"
	if torch.backends.mps.is_available() and torch.backends.mps.is_built():
		UpperCAmelCase__:	str									= "mps"
	if device == "mps":
		print(
		    "WARNING: MPS currently doesn't seem to work, and messes up backpropagation without any visible torch"
		    " errors. I recommend using CUDA on a colab notebook or CPU instead if you're facing inexplicable issues"
		    " with generations."      )
	return device



def 			_A	(      SCREAMING_SNAKE_CASE      ):
	UpperCAmelCase__:	Optional[int]									= plt.imshow(SCREAMING_SNAKE_CASE      )
	fig.axes.get_xaxis().set_visible(SCREAMING_SNAKE_CASE      )
	fig.axes.get_yaxis().set_visible(SCREAMING_SNAKE_CASE      )
	plt.show()



def 			_A	(      ):
	UpperCAmelCase__:	int									= datetime.now()
	UpperCAmelCase__:	List[Any]									= current_time.strftime("%H:%M:%S"      )
	return timestamp


def 			_A	(      SCREAMING_SNAKE_CASE      ):  # noqa: E741
	UpperCAmelCase__:	int									= len(SCREAMING_SNAKE_CASE      )
	UpperCAmelCase__:	Dict									= 0
	UpperCAmelCase__:	Optional[int]									= [0] * n
	UpperCAmelCase__:	List[str]									= [False] * n
	UpperCAmelCase__:	List[str]									= [False] * n

	def dfs(SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE      ):
		if parent == root:
			out_edge_count += 1
		UpperCAmelCase__:	List[str]									= True
		UpperCAmelCase__:	List[Any]									= at

		for to in l[at]:
			if to == parent:
				pass
			elif not visited[to]:
				UpperCAmelCase__:	str									= dfs(SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE      )
				UpperCAmelCase__:	Optional[Any]									= min(low[at]	,low[to]      )

				# AP found via bridge
				if at < low[to]:
					UpperCAmelCase__:	List[Any]									= True
				# AP found via cycle
				if at == low[to]:
					UpperCAmelCase__:	str									= True
			else:
				UpperCAmelCase__:	Union[str, Any]									= min(low[at]	,SCREAMING_SNAKE_CASE      )
		return out_edge_count

	for i in range(SCREAMING_SNAKE_CASE      ):
		if not visited[i]:
			UpperCAmelCase__:	Optional[Any]									= 0
			UpperCAmelCase__:	Union[str, Any]									= dfs(SCREAMING_SNAKE_CASE	,SCREAMING_SNAKE_CASE	,-1	,SCREAMING_SNAKE_CASE      )
			UpperCAmelCase__:	Tuple									= out_edge_count > 1

	for x in range(len(SCREAMING_SNAKE_CASE      )      ):
		if is_art[x] is True:
			print(SCREAMING_SNAKE_CASE      )


# Adjacency list of graph
_lowerCAmelCase  :      Any			 ={
    0: [1, 2],
    1: [0, 2],
    2: [0, 1, 3, 5],
    3: [2, 4],
    4: [3],
    5: [2, 6, 8],
    6: [5, 7],
    7: [6, 8],
    8: [5, 7],
}
compute_ap(data)