



from collections import deque

from .hash_table import HashTable

class  __snake_case      (   SCREAMING_SNAKE_CASE):







							'''simple docstring'''






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


							def _a      (							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 _a      (							self		):
											return (
											    sum(self.charge_factor - len(a_		) for slot in self.values		)
											    / self.size_table
											    * self.charge_factor
											)







							def _a      (							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 typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


UpperCAmelCase							 =					{
    """configuration_falcon""": ["""FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FalconConfig"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase							 =					[
	    """FALCON_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """FalconForCausalLM""",
	    """FalconModel""",
	    """FalconPreTrainedModel""",
	    """FalconForSequenceClassification""",
	    """FalconForTokenClassification""",
	    """FalconForQuestionAnswering""",
	]


if TYPE_CHECKING:
	from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_falcon import (
		    FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
		    FalconForCausalLM,
		    FalconForQuestionAnswering,
		    FalconForSequenceClassification,
		    FalconForTokenClassification,
		    FalconModel,
		    FalconPreTrainedModel,
		)


else:
	import sys

	UpperCAmelCase							 =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

