


'''simple docstring'''

from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowercase_     		= {'configuration_van': ['VAN_PRETRAINED_CONFIG_ARCHIVE_MAP', 'VanConfig']}


try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_     		= [
							    'VAN_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'VanForImageClassification',
							    'VanModel',
							    'VanPreTrainedModel',
							]

if TYPE_CHECKING:
							from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_van import (
														    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
														    VanForImageClassification,
														    VanModel,
														    VanPreTrainedModel,
														)

else:
							import sys

							lowercase_     		= _LazyModule(__name__, globals()['''__file__'''], _import_structure)






'''simple docstring'''

def 							UpperCamelCase__			(			a__      ):


						'''simple docstring'''






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



def 							UpperCamelCase__			(			a__			,      a__			,      a__			,      a__      ):


						'''simple docstring'''






						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()





