code: 
  
  
  """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
  
  
  __magic_name__	:   Optional[Any]          =							logging.get_logger(__name__)
  
  __magic_name__	:   Tuple          =							{
      """apple/mobilevitv2-1.0""": """https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json""",
  }
  
  
  
  
  class  __snake_case      (lowerCAmelCase_     ):
  							__a				   =					"""mobilevitv2"""
  
  
  
  
  							def __init__(    self:						List[str]    ,       A_:						Tuple=3    ,       A_:						Tuple=2_56    ,       A_:						Dict=2    ,       A_:						Union[str, Any]=2.0    ,       A_:						Tuple="swish"    ,       A_:						Dict=3    ,       A_:						Any=32    ,       A_:						Any=0.1    ,       A_:						List[Any]=0.02    ,       A_:						Any=1E-5    ,       A_:						Optional[Any]=5_12    ,       A_:						Optional[Any]=[6, 12, 18]    ,       A_:						int=0.1    ,       A_:						int=2_55    ,       A_:						Optional[int]=[2, 4, 3]    ,       A_:						List[str]=[1_28, 1_92, 2_56]    ,       A_:						Dict=1.0    ,       A_:						Tuple=2    ,       A_:						Optional[int]=0.0    ,       A_:						str=0.0    ,       **A_:						int    ,       ):
  										super().__init__(**__SCREAMING_SNAKE_CASE      )
  
  										__lowerCamelCase        =			num_channels
  										__lowerCamelCase        =			image_size
  										__lowerCamelCase        =			patch_size
  										__lowerCamelCase        =			expand_ratio
  										__lowerCamelCase        =			hidden_act
  										__lowerCamelCase        =			conv_kernel_size
  										__lowerCamelCase        =			output_stride
  										__lowerCamelCase        =			initializer_range
  										__lowerCamelCase        =			layer_norm_eps
  										__lowerCamelCase        =			n_attn_blocks
  										__lowerCamelCase        =			base_attn_unit_dims
  										__lowerCamelCase        =			width_multiplier
  										__lowerCamelCase        =			ffn_multiplier
  										__lowerCamelCase        =			ffn_dropout
  										__lowerCamelCase        =			attn_dropout
  										__lowerCamelCase        =			classifier_dropout_prob
  
  										# decode head attributes for semantic segmentation
  										__lowerCamelCase        =			aspp_out_channels
  										__lowerCamelCase        =			atrous_rates
  										__lowerCamelCase        =			aspp_dropout_prob
  										__lowerCamelCase        =			semantic_loss_ignore_index
  
  
  
  
  class  __snake_case      (lowerCAmelCase_     ):
  							__a				   =					version.parse('''1.11'''     )
  
  
  
  
  							@property
  							def      __a      (    self:						int      ):
  										return OrderedDict([("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""})]      )
  
  
  
  
  							@property
  							def      __a      (    self:						Dict      ):
  
  										if self.task == "image-classification":
  													return OrderedDict([("""logits""", {0: """batch"""})]      )
  										else:
  													return OrderedDict([("""last_hidden_state""", {0: """batch"""}), ("""pooler_output""", {0: """batch"""})]      )
  
  
  
  
  							@property
  							def      __a      (    self:						int      ):
  										return 1E-4
  
  
  
  
  
style_context: 
  
  
  """simple docstring"""
  
  
  
  
  # Lint as: python3
  
  import hashlib
  from typing import Union
  
  
  
  
  
  def 			a_   (  lowercase__   :Union[str, int, bytes]    ):
  			if isinstance(lowercase__, lowercase__    ):
  						# Data already in bytes, returns as it as
  						return hash_data
  			elif isinstance(lowercase__, lowercase__    ):
  						# We keep the data as it as for it ot be later encoded to UTF-8
  						# However replace `\\` with `/` for Windows compatibility
  						__lowerCamelCase        =			hash_data.replace("""\\""", """/"""    )
  			elif isinstance(lowercase__, lowercase__    ):
  						__lowerCamelCase        =			str(lowercase__    )
  			else:
  						# If data is not of the required type, raise error
  						raise InvalidKeyError(lowercase__    )
  
  			return hash_data.encode("""utf-8"""    )
  
  
  
  
  class  __snake_case      (lowerCamelCase     ):
  
  
  
  
  							def __init__(    self:						Union[str, Any]    ,       A_:						Tuple      ):
  										__lowerCamelCase        =			"""\nFAILURE TO GENERATE DATASET: Invalid key type detected"""
  										__lowerCamelCase        =			f'\nFound Key {hash_data} of type {type(A_      )}'
  										__lowerCamelCase        =			"""\nKeys should be either str, int or bytes type"""
  										super().__init__(f'{self.prefix}{self.err_msg}{self.suffix}'      )
  
  
  
  
  class  __snake_case      (lowerCamelCase     ):
  
  
  
  
  							def __init__(    self:						Any    ,       A_:						Dict    ,       A_:						List[Any]    ,       A_:						List[str]=""      ):
  										__lowerCamelCase        =			key
  										__lowerCamelCase        =			duplicate_key_indices
  										__lowerCamelCase        =			fix_msg
  										__lowerCamelCase        =			"""Found multiple examples generated with the same key"""
  										if len(A_      ) <= 20:
  													__lowerCamelCase        =			f'\nThe examples at index {", ".join(A_      )} have the key {key}'
  										else:
  													__lowerCamelCase        =			f'\nThe examples at index {", ".join(duplicate_key_indices[:20]      )}... ({len(A_      ) - 20} more) have the key {key}'
  										__lowerCamelCase        =			"""\n""" + fix_msg if fix_msg else """"""
  										super().__init__(f'{self.prefix}{self.err_msg}{self.suffix}'      )
  
  
  
  
  class  __snake_case      :
  
  
  
  
  							def __init__(    self:						Dict    ,       A_:						str      ):
  										__lowerCamelCase        =			hashlib.mda(_as_bytes(A_      )      )
  
  
  
  
  							def      __a      (    self:						int    ,       A_:						Union[str, int, bytes]      ):
  										__lowerCamelCase        =			self._split_mda.copy()
  										__lowerCamelCase        =			_as_bytes(A_      )
  										mda.update(A_      )
  										# Convert to integer with hexadecimal conversion
  										return int(mda.hexdigest()    ,       16      )
  
  
  
  
  