


'''simple docstring'''
def 			_lowercase       (				UpperCamelCase__       :					dict			):
 __A  :		set[int]       =			set()
 # To detect a back edge, keep track of vertices currently in the recursion stack
 __A  :		set[int]       =			set()
 return any(
     node not in visited and depth_first_search(UpperCamelCase__,				UpperCamelCase__,				UpperCamelCase__,				UpperCamelCase__			)
     for node in graph			)


def 			_lowercase       (				UpperCamelCase__       :					dict,				UpperCamelCase__       :					int,				UpperCamelCase__       :					set,				UpperCamelCase__       :					set			):
 visited.add(UpperCamelCase__			)
 rec_stk.add(UpperCamelCase__			)

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

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


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

 testmod()










'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_ :     Dict								=      logging.get_logger(__name__)

UpperCAmelCase_ :     Optional[int]								=      {
    'sayakpaul/vit-msn-base': 'https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}

class 						_lowerCamelCase					(    snake_case_				):




 '''simple docstring'''
 __lowercase				:		Tuple    							=						'''vit_msn'''


 def __init__(      self      ,      __lowercase=768      ,      __lowercase=12      ,      __lowercase=12      ,      __lowercase=3_072      ,      __lowercase="gelu"      ,      __lowercase=0.0      ,      __lowercase=0.0      ,      __lowercase=0.0_2      ,      __lowercase=1E-06      ,      __lowercase=224      ,      __lowercase=16      ,      __lowercase=3      ,      __lowercase=True      ,      **__lowercase      ,      ):

  """simple docstring"""







  super().__init__(**__lowercase						)

  __A  :		Tuple       =			hidden_size
  __A  :		Optional[int]       =			num_hidden_layers
  __A  :		str       =			num_attention_heads
  __A  :		Dict       =			intermediate_size
  __A  :		Optional[Any]       =			hidden_act
  __A  :		Union[str, Any]       =			hidden_dropout_prob
  __A  :		Optional[Any]       =			attention_probs_dropout_prob
  __A  :		List[str]       =			initializer_range
  __A  :		Dict       =			layer_norm_eps
  __A  :		List[Any]       =			image_size
  __A  :		Optional[int]       =			patch_size
  __A  :		List[Any]       =			num_channels
  __A  :		Optional[Any]       =			qkv_bias






