



from collections import deque

from .hash_table import HashTable



class      _UpperCAmelCase      (							A__  ):




     def __init__(					self			,    *a__			,    **a__):
         super().__init__(*a__			,    **a__)




     def 		snake_case_		(					self			,    a__			,    a__):
         A__					=       deque([]) if self.values[key] is None else self.values[key]
         self.values[key].appendleft(a__)
         A__					=       self.values[key]




     def 		snake_case_		(					self):
         return (
             sum(self.charge_factor - len(a__) for slot in self.values)
             / self.size_table
             * self.charge_factor
         )




     def 		snake_case_		(					self			,    a__			,    a__=None):
         if not (
             len(self.values[key]) == self.charge_factor and self.values.count(a__) == 0
         ):
             return key
         return super()._collision_resolution(a__			,    a__)





from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowercase    	=		logging.get_logger(__name__)



class      _UpperCAmelCase      (							A__  ):
     UpperCamelCase__		     =					'''timm_backbone'''




     def __init__(					self			,    a__=None			,    a__=3			,    a__=True			,    a__=True			,    a__=None			,    **a__			,    ):
         super().__init__(**a__)
         A__					=       backbone
         A__					=       num_channels
         A__					=       features_only
         A__					=       use_pretrained_backbone
         A__					=       True
         A__					=       out_indices if out_indices is not None else (-1,)
