
'''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



from typing import TYPE_CHECKING

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


snake_case_      :					Any				      =     {
    'configuration_imagegpt': ['IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ImageGPTConfig', 'ImageGPTOnnxConfig']
}

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case_      :					str				      =     ['ImageGPTFeatureExtractor']
	snake_case_      :					Optional[int]				      =     ['ImageGPTImageProcessor']

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case_      :					List[str]				      =     [
	    'IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'ImageGPTForCausalImageModeling',
	    'ImageGPTForImageClassification',
	    'ImageGPTModel',
	    'ImageGPTPreTrainedModel',
	    'load_tf_weights_in_imagegpt',
	]


if TYPE_CHECKING:
	from .configuration_imagegpt import IMAGEGPT_PRETRAINED_CONFIG_ARCHIVE_MAP, ImageGPTConfig, ImageGPTOnnxConfig

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .feature_extraction_imagegpt import ImageGPTFeatureExtractor
		from .image_processing_imagegpt import ImageGPTImageProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_imagegpt import (
		    IMAGEGPT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    ImageGPTForCausalImageModeling,
		    ImageGPTForImageClassification,
		    ImageGPTModel,
		    ImageGPTPreTrainedModel,
		    load_tf_weights_in_imagegpt,
		)

else:
	import sys

	snake_case_      :					Dict				      =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
