
'''simple docstring'''





class     a :




				def __init__(				self						:					Dict   ):
										snake_case							:  List[str]			=     []
										snake_case							:  Any			=     0
										snake_case							:  Union[str, Any]			=     0




				def __str__(				self						:					Dict   ):
										snake_case							:  Optional[Any]			=     '''<''' + str(self.entries   )[1:-1] + '''>'''
										return printed




				def 						__snake_case				(				self						:					Optional[int],     SCREAMING_SNAKE_CASE_						:					Union[str, Any]   ):
										self.entries.append(SCREAMING_SNAKE_CASE_   )
										snake_case							:  int			=     self.length + 1




				def 						__snake_case				(				self						:					Dict   ):
										snake_case							:  Tuple			=     self.length - 1
										snake_case							:  Optional[int]			=     self.entries[self.front]
										# self.front-=1
										# self.entries = self.entries[self.front:]
										snake_case							:  List[Any]			=     self.entries[1:]
										return dequeued




				def 						__snake_case				(				self						:					Tuple,     SCREAMING_SNAKE_CASE_						:					Dict   ):
										for _ in range(SCREAMING_SNAKE_CASE_   ):
																self.put(self.get()   )




				def 						__snake_case				(				self						:					List[str]   ):
										return self.entries[0]




				def 						__snake_case				(				self						:					int   ):
										return self.length





"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


SCREAMING_SNAKE_CASE					:       Tuple							   =							{
    """configuration_realm""": ["""REALM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RealmConfig"""],
    """tokenization_realm""": ["""RealmTokenizer"""],
}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE					:       Optional[Any]							   =							["""RealmTokenizerFast"""]

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE					:       Dict							   =							[
			    """REALM_PRETRAINED_MODEL_ARCHIVE_LIST""",
			    """RealmEmbedder""",
			    """RealmForOpenQA""",
			    """RealmKnowledgeAugEncoder""",
			    """RealmPreTrainedModel""",
			    """RealmReader""",
			    """RealmScorer""",
			    """load_tf_weights_in_realm""",
			]
			SCREAMING_SNAKE_CASE					:       Union[str, Any]							   =							["""RealmRetriever"""]


if TYPE_CHECKING:
			from .configuration_realm import REALM_PRETRAINED_CONFIG_ARCHIVE_MAP, RealmConfig
			from .tokenization_realm import RealmTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_realm import RealmTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_realm import (
						    REALM_PRETRAINED_MODEL_ARCHIVE_LIST,
						    RealmEmbedder,
						    RealmForOpenQA,
						    RealmKnowledgeAugEncoder,
						    RealmPreTrainedModel,
						    RealmReader,
						    RealmScorer,
						    load_tf_weights_in_realm,
						)
						from .retrieval_realm import RealmRetriever


else:
			import sys

			SCREAMING_SNAKE_CASE					:       str							   =							_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





