'''simple docstring'''




from __future__ import annotations

from collections import deque
from queue import Queue
from timeit import timeit

_UpperCamelCase				:		Union[str, Any]       			=		{
    'A': ['B', 'C'],
    'B': ['A', 'D', 'E'],
    'C': ['A', 'F'],
    'D': ['B'],
    'E': ['B', 'F'],
    'F': ['C', 'E'],
}



def 						__snake_case (       lowerCAmelCase       :     dict      ,  lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					{start}
 __UpperCAmelCase         =					[start]
 __UpperCAmelCase         =					Queue()
 queue.put(lowerCAmelCase			)
 while not queue.empty():
  __UpperCAmelCase         =					queue.get()
  for w in graph[v]:
   if w not in explored:
    explored.add(lowerCAmelCase			)
    result.append(lowerCAmelCase			)
    queue.put(lowerCAmelCase			)
 return result



def 						__snake_case (       lowerCAmelCase       :     dict      ,  lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					{start}
 __UpperCAmelCase         =					[start]
 __UpperCAmelCase         =					deque([start]			)
 while queue:
  __UpperCAmelCase         =					queue.popleft()
  for child in graph[v]:
   if child not in visited:
    visited.add(lowerCAmelCase			)
    result.append(lowerCAmelCase			)
    queue.append(lowerCAmelCase			)
 return result



def 						__snake_case (       lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					F"""from __main__ import G, {name}"""
 __UpperCAmelCase         =					1_0000
 __UpperCAmelCase         =					timeit(F"""{name}(G, 'A')"""      ,  setup=lowerCAmelCase      ,  number=lowerCAmelCase			)
 print(F"""{name:<35} finished {number} runs in {res:.5f} seconds"""			)


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     benchmark_function('breadth_first_search')
     benchmark_function('breadth_first_search_with_deque')
     # breadth_first_search                finished 10000 runs in 0.20999 seconds
     # breadth_first_search_with_deque     finished 10000 runs in 0.01421 seconds




'''simple docstring'''




from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_UpperCamelCase				:		Any       			=		logging.get_logger(__name__)

_UpperCamelCase				:		Any       			=		{
    'apple/mobilevitv2-1.0': 'https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json',
}

class   _lowercase(     _lowerCamelCase				):



   """simple docstring"""





   __lowerCamelCase    =  '''mobilevitv2'''





   def __init__(							self:    Union[str, Any]			,a:    Optional[int]=3			,a:    Any=256			,a:    str=2			,a:    Any=2.0			,a:    Union[str, Any]="swish"			,a:    List[str]=3			,a:    List[str]=32			,a:    int=0.1			,a:    List[Any]=0.02			,a:    List[Any]=1e-5			,a:    Tuple=512			,a:    Optional[Any]=[6, 12, 18]			,a:    Dict=0.1			,a:    List[Any]=255			,a:    Union[str, Any]=[2, 4, 3]			,a:    str=[128, 192, 256]			,a:    int=1.0			,a:    Optional[int]=2			,a:    Optional[Any]=0.0			,a:    int=0.0			,**a:    Optional[Any]			,):
    super().__init__(**a	)

    __UpperCAmelCase         =					num_channels
    __UpperCAmelCase         =					image_size
    __UpperCAmelCase         =					patch_size
    __UpperCAmelCase         =					expand_ratio
    __UpperCAmelCase         =					hidden_act
    __UpperCAmelCase         =					conv_kernel_size
    __UpperCAmelCase         =					output_stride
    __UpperCAmelCase         =					initializer_range
    __UpperCAmelCase         =					layer_norm_eps
    __UpperCAmelCase         =					n_attn_blocks
    __UpperCAmelCase         =					base_attn_unit_dims
    __UpperCAmelCase         =					width_multiplier
    __UpperCAmelCase         =					ffn_multiplier
    __UpperCAmelCase         =					ffn_dropout
    __UpperCAmelCase         =					attn_dropout
    __UpperCAmelCase         =					classifier_dropout_prob

    # decode head attributes for semantic segmentation
    __UpperCAmelCase         =					aspp_out_channels
    __UpperCAmelCase         =					atrous_rates
    __UpperCAmelCase         =					aspp_dropout_prob
    __UpperCAmelCase         =					semantic_loss_ignore_index




class   _lowercase(     _lowerCamelCase				):



   """simple docstring"""





   __lowerCamelCase    =  version.parse('''1.11'''				)





   @property
   def 			snake_case	(							self:    Optional[int]	):
    return OrderedDict([('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'})]	)





   @property
   def 			snake_case	(							self:    Tuple	):
    if self.task == "image-classification":
     return OrderedDict([('logits', {0: 'batch'})]	)
    else:
     return OrderedDict([('last_hidden_state', {0: 'batch'}), ('pooler_output', {0: 'batch'})]	)





   @property
   def 			snake_case	(							self:    Union[str, Any]	):
    return 1e-4



