






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase    				=   {
    "configuration_lilt": ["LILT_PRETRAINED_CONFIG_ARCHIVE_MAP", "LiltConfig"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase    				=   [
	    "LILT_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "LiltForQuestionAnswering",
	    "LiltForSequenceClassification",
	    "LiltForTokenClassification",
	    "LiltModel",
	    "LiltPreTrainedModel",
	]

if TYPE_CHECKING:
	from .configuration_lilt import LILT_PRETRAINED_CONFIG_ARCHIVE_MAP, LiltConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_lilt import (
		    LILT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    LiltForQuestionAnswering,
		    LiltForSequenceClassification,
		    LiltForTokenClassification,
		    LiltModel,
		    LiltPreTrainedModel,
		)

else:
	import sys

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













class 					UpperCamelCase_ :



	'''simple docstring'''




	def __init__(			self			,     a   )			->       Tuple:
								snake_case_           =				n
								snake_case_           =				[None] * self.n
								snake_case_           =				0  # index of the first element
								snake_case_           =				0
								snake_case_           =				0




	def __len__(			self   )			->       int:
								return self.size




	def 				_UpperCamelCase     (			self   )			->       bool:
								return self.size == 0




	def 				_UpperCamelCase     (			self   )			->       List[Any]:
								return False if self.is_empty() else self.array[self.front]




	def 				_UpperCamelCase     (			self			,     a   )			->       Dict:
								if self.size >= self.n:
															raise Exception('QUEUE IS FULL'   )

								snake_case_           =				data
								snake_case_           =				(self.rear + 1) % self.n
								self.size += 1
								return self






	def 				_UpperCamelCase     (			self   )			->       List[Any]:
								if self.size == 0:
															raise Exception('UNDERFLOW'   )

								snake_case_           =				self.array[self.front]
								snake_case_           =				None
								snake_case_           =				(self.front + 1) % self.n
								self.size -= 1
								return temp





