





def  _SCREAMING_SNAKE_CASE				(   a  )      ->      bool:
					__A	:						List[Any]       =				set()
					# To detect a back edge, keep track of vertices currently in the recursion stack
					__A	:						Dict       =				set()
					return any(
					    node not in visited and depth_first_search(a					,						a					,						a					,						a  )
					    for node in graph  )







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a					,						a  )      ->      bool:
					visited.add(a  )
					rec_stk.add(a  )

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

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


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

				testmod()











def _a				(	lowerCamelCase:   dict )	->						bool:







      '''simple docstring'''






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



def _a				(	lowerCamelCase:   dict					,				lowerCamelCase:   int					,				lowerCamelCase:   set					,				lowerCamelCase:   set )	->						bool:







      '''simple docstring'''






      visited.add(lowerCamelCase )
      rec_stk.add(lowerCamelCase )

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

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


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

       testmod()





