'''simple docstring'''


from collections import deque

from .hash_table import HashTable





class       _a    (		__a      ):


  """simple docstring"""

  def __init__(		self      :       Any   ,				*lowercase_      :       Optional[int]   ,				**lowercase_      :       int      ):







    '''simple docstring'''


    super().__init__(*lowercase_   ,				**lowercase_      )




  def 		lowerCamelCase__  (		self      :       int   ,				lowercase_      :       List[str]   ,				lowercase_      :       List[Any]      ):







    '''simple docstring'''


    lowercase_     =       deque([]      ) if self.values[key] is None else self.values[key]
    self.values[key].appendleft(lowercase_      )
    lowercase_     =       self.values[key]




  def 		lowerCamelCase__  (		self      :       Tuple      ):







    '''simple docstring'''


    return (
        sum(self.charge_factor - len(lowercase_      ) for slot in self.values      )
        / self.size_table
        * self.charge_factor
    )





  def 		lowerCamelCase__  (		self      :       Tuple   ,				lowercase_      :       Optional[int]   ,				lowercase_      :       Optional[Any]=None      ):







    '''simple docstring'''


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


'''simple docstring'''


def   A_      (       SCREAMING_SNAKE_CASE_						)			->bool:
  if number < 0:
    raise ValueError("""number must not be negative"""						)
  return number & (number - 1) == 0


if __name__ == "__main__":
       import doctest

       doctest.testmod()

