






from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime



class 						lowerCamelCase   (_snake_case    ):







		'''simple docstring'''



		def __init__(							self       ,	*_UpperCamelCase       ,	**_UpperCamelCase     )			->							Union[str, Any]:
							super().__init__(*_UpperCamelCase       ,	**_UpperCamelCase     )



		def       __UpperCAmelCase    (							self       ,	_UpperCamelCase       ,	_UpperCamelCase     )			->							List[str]:
							UpperCAmelCase_					:   List[str]   =		(
							    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       ,	_UpperCamelCase       ,	_UpperCamelCase       ,	_UpperCamelCase     )			->							Tuple:
							return (increment * self.__hash_function_a(_UpperCamelCase       ,	_UpperCamelCase     )) % self.size_table



		def       __UpperCAmelCase    (							self       ,	_UpperCamelCase       ,	_UpperCamelCase=None     )			->							Tuple:
							UpperCAmelCase_					:   int   =		1
							UpperCAmelCase_					:   Optional[Any]   =		self.hash_function(_UpperCamelCase     )

							while self.values[new_key] is not None and self.values[new_key] != key:
												UpperCAmelCase_					:   Optional[Any]   =		(
												    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














from typing import TYPE_CHECKING

from ...utils import _LazyModule


__UpperCAmelCase										=		{'tokenization_phobert': ['PhobertTokenizer']}


if TYPE_CHECKING:
		from .tokenization_phobert import PhobertTokenizer

else:
		import sys

		__UpperCAmelCase										=		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






