
from __future__ import annotations

def  __snake_case							(	__magic_name__		,    __magic_name__		,    __magic_name__						):







				'''simple docstring'''


				if len(__magic_name__						) == 0:
								raise ValueError("find_max() arg is an empty sequence"						)
				if (
				    left >= len(__magic_name__						)
				    or left < -len(__magic_name__						)
				    or right >= len(__magic_name__						)
				    or right < -len(__magic_name__						)
				):
								raise IndexError("list index out of range"						)
				if left == right:
								return nums[left]
				lowercase         =      (left + right) >> 1  # the middle
				lowercase         =      find_max(__magic_name__		,    __magic_name__		,    __magic_name__						)  # find max in range[left, mid]
				lowercase         =      find_max(__magic_name__		,    mid + 1		,    __magic_name__						)  # find max in range[mid + 1, right]

				return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)


def  __snake_case							(	__magic_name__						):







				'''simple docstring'''


				lowercase         =      set()
				# To detect a back edge, keep track of vertices currently in the recursion stack
				lowercase         =      set()
				return any(
				    node not in visited and depth_first_search(__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						)
				    for node in graph						)

def  __snake_case							(	__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						):







				'''simple docstring'''


				visited.add(__magic_name__						)
				rec_stk.add(__magic_name__						)

				for node in graph[vertex]:
								if node not in visited:
												if depth_first_search(__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						):
																return True
								elif node in rec_stk:
												return True

    # The node needs to be removed from recursion stack before function ends
				rec_stk.remove(__magic_name__						)
				return False


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

						testmod()
