
"""simple docstring"""







from collections.abc import Iterable
from typing import Generic, TypeVar

_SCREAMING_SNAKE_CASE	       =      TypeVar("""_T""")







class 							__magic_name__     (		Generic[_T]   ):





					def __init__(				self   :							Tuple							,						snake_case_   :							Iterable[_T] | None = None    ):
												__snake_case     			=       list(iterable or []    )
												__snake_case     			=       []





					def __len__(				self   :							Optional[int]    ):
												return len(self._stacka    ) + len(self._stacka    )





					def __repr__(				self   :							Union[str, Any]    ):
												return F'''Queue({tuple(self._stacka[::-1] + self._stacka    )})'''





					def 							lowerCAmelCase      (				self   :							int							,						snake_case_   :							_T    ):
												self._stacka.append(snake_case_    )





					def 							lowerCAmelCase      (				self   :							Union[str, Any]    ):
												__snake_case     			=       self._stacka.pop
												__snake_case     			=       self._stacka.append

												if not self._stacka:
																			while self._stacka:
																										stacka_append(stacka_pop()    )

												if not self._stacka:
																			raise IndexError("Queue is empty"    )
												return self._stacka.pop()


if __name__ == "__main__":
		from doctest import testmod

		testmod()


"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


_SCREAMING_SNAKE_CASE	       =      {
    """configuration_mobilevit""": ["""MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MobileViTConfig""", """MobileViTOnnxConfig"""],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE	       =      ["""MobileViTFeatureExtractor"""]
		_SCREAMING_SNAKE_CASE	       =      ["""MobileViTImageProcessor"""]

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE	       =      [
		    """MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST""",
		    """MobileViTForImageClassification""",
		    """MobileViTForSemanticSegmentation""",
		    """MobileViTModel""",
		    """MobileViTPreTrainedModel""",
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE	       =      [
		    """TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST""",
		    """TFMobileViTForImageClassification""",
		    """TFMobileViTForSemanticSegmentation""",
		    """TFMobileViTModel""",
		    """TFMobileViTPreTrainedModel""",
		]

if TYPE_CHECKING:
		from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_mobilevit import MobileViTFeatureExtractor
				from .image_processing_mobilevit import MobileViTImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mobilevit import (
				    MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    MobileViTForImageClassification,
				    MobileViTForSemanticSegmentation,
				    MobileViTModel,
				    MobileViTPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_mobilevit import (
				    TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFMobileViTForImageClassification,
				    TFMobileViTForSemanticSegmentation,
				    TFMobileViTModel,
				    TFMobileViTPreTrainedModel,
				)


else:
		import sys

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