






'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A:      Optional[int]  				=				{
    "configuration_upernet": ["UperNetConfig"],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A:      Optional[Any]  				=				[
						    "UperNetForSemanticSegmentation",
						    "UperNetPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_upernet import UperNetConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_upernet import UperNetForSemanticSegmentation, UperNetPreTrainedModel


else:
						import sys

						A:      Optional[int]  				=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)








'''simple docstring'''

class 							__magic_name__     :







	"""simple docstring"""



	def __init__(							self  ,      _lowercase       )						->  Union[str, Any]:
							lowercase_      :   Dict        =			n
							lowercase_      :   Dict        =			[None] * self.n
							lowercase_      :   Tuple        =			0  # index of the first element
							lowercase_      :   List[Any]        =			0
							lowercase_      :   List[Any]        =			0
	def __len__(							self       )						->  int:
							return self.size
	def        lowerCamelCase__		(							self       )						->  bool:
							return self.size == 0
	def        lowerCamelCase__		(							self       )						->  List[Any]:
							return False if self.is_empty() else self.array[self.front]
	def        lowerCamelCase__		(							self  ,      _lowercase       )						->  Any:
							if self.size >= self.n:
													raise Exception('QUEUE IS FULL'       )

							lowercase_      :   Tuple        =			data
							lowercase_      :   List[Any]        =			(self.rear + 1) % self.n
							self.size += 1
							return self







	def        lowerCamelCase__		(							self       )						->  Any:
							if self.size == 0:
													raise Exception('UNDERFLOW'       )

							lowercase_      :   Dict        =			self.array[self.front]
							lowercase_      :   Tuple        =			None
							lowercase_      :   int        =			(self.front + 1) % self.n
							self.size -= 1
							return temp
