code: 
  
  
  
  
  
  
  """simple docstring"""
  
  
  
  
  
  
  import copy
  from typing import Dict
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  from ..auto.configuration_auto import CONFIG_MAPPING
  from ..bit import BitConfig
  
  
  A_			  =    logging.get_logger(__name__)
  
  A_			  =    {
      "google/vit-hybrid-base-bit-384": "https://huggingface.co/vit-hybrid-base-bit-384/resolve/main/config.json",
      # See all ViT hybrid models at https://huggingface.co/models?filter=vit
  }
  class 						__lowerCAmelCase   (			UpperCAmelCase       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    __lowerCamelCase       :    Dict     	=			"vit-hybrid"
    def __init__(      self:		int				,			UpperCamelCase_:		str=None				,			UpperCamelCase_:		Any=768				,			UpperCamelCase_:		Dict=12				,			UpperCamelCase_:		List[str]=12				,			UpperCamelCase_:		Optional[int]=3072				,			UpperCamelCase_:		Tuple="gelu"				,			UpperCamelCase_:		int=0.0				,			UpperCamelCase_:		int=0.0				,			UpperCamelCase_:		Union[str, Any]=0.02				,			UpperCamelCase_:		Optional[int]=1e-1_2				,			UpperCamelCase_:		List[str]=224				,			UpperCamelCase_:		Union[str, Any]=1				,			UpperCamelCase_:		str=3				,			UpperCamelCase_:		Tuple=[1, 1024, 24, 24]				,			UpperCamelCase_:		str=True				,			**UpperCamelCase_:		Any				,			):
       super().__init__(**UpperCamelCase_					)
  
       if backbone_config is None:
          logger.info("`backbone_config` is `None`. Initializing the config with a `BiT` backbone."					)
          UpperCamelCase_     ={
              "global_padding": "same",
              "layer_type": "bottleneck",
              "depths": [3, 4, 9],
              "out_features": ["stage3"],
              "embedding_dynamic_padding": True,
          }
  
       if isinstance(UpperCamelCase_				,			UpperCamelCase_					):
          if "model_type" in backbone_config:
             UpperCamelCase_     =CONFIG_MAPPING[backbone_config["model_type"]]
          else:
             logger.info(
                 "`model_type` is not found in `backbone_config`. Use `Bit` as the backbone configuration class."					)
             UpperCamelCase_     =BitConfig
          UpperCamelCase_     =backbone_config_class(**UpperCamelCase_					)
  
       UpperCamelCase_     =backbone_featmap_shape
       UpperCamelCase_     =backbone_config
       UpperCamelCase_     =hidden_size
       UpperCamelCase_     =num_hidden_layers
       UpperCamelCase_     =num_attention_heads
       UpperCamelCase_     =intermediate_size
       UpperCamelCase_     =hidden_act
       UpperCamelCase_     =hidden_dropout_prob
       UpperCamelCase_     =attention_probs_dropout_prob
       UpperCamelCase_     =initializer_range
       UpperCamelCase_     =layer_norm_eps
       UpperCamelCase_     =image_size
       UpperCamelCase_     =patch_size
       UpperCamelCase_     =num_channels
       UpperCamelCase_     =qkv_bias
  
  
  
  
  
    def 					UpperCamelCase__   (      self:		List[Any]					):
       UpperCamelCase_     =copy.deepcopy(self.__dict__					)
       UpperCamelCase_     =self.backbone_config.to_dict()
       UpperCamelCase_     =self.__class__.model_type
       return output
  
style_context: 
  
  
  
  
  
  
  """simple docstring"""
  
  
  
  
  
  
  from .hash_table import HashTable
  from .number_theory.prime_numbers import is_prime, next_prime
  class 						__lowerCAmelCase   (			UpperCAmelCase       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    def __init__(      self:		List[Any]				,			*UpperCamelCase_:		Dict				,			**UpperCamelCase_:		Optional[int]					):
       super().__init__(*UpperCamelCase_				,			**UpperCamelCase_					)
    def 					UpperCamelCase__   (      self:		Any				,			UpperCamelCase_:		Optional[int]				,			UpperCamelCase_:		Optional[int]					):
       UpperCamelCase_     =(
           next_prime(value % self.size_table					)
           if not is_prime(value % self.size_table					)
           else value % self.size_table
       )  # gt = bigger than
       return next_prime_gt - (data % next_prime_gt)
    def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		List[str]				,			UpperCamelCase_:		str				,			UpperCamelCase_:		Tuple					):
       return (increment * self.__hash_function_a(UpperCamelCase_				,			UpperCamelCase_					)) % self.size_table
  
  
  
  
  
    def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		int				,			UpperCamelCase_:		str=None					):
       UpperCamelCase_     =1
       UpperCamelCase_     =self.hash_function(UpperCamelCase_					)
  
       while self.values[new_key] is not None and self.values[new_key] != key:
          UpperCamelCase_     =(
              self.__hash_double_function(UpperCamelCase_				,			UpperCamelCase_				,			UpperCamelCase_					)
              if self.balanced_factor() >= self.lim_charge
              else None
          )
          if new_key is None:
             break
          else:
             i += 1
  
       return new_key
  