




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

_snake_case				:				Optional[Any]       							=		TypeVar('_T')

class       A   (		Generic[_T]   ):







							def __init__(  self	:  Any							,      lowerCAmelCase_	:  Iterable[_T] | None = None )      ->							None:


														"""simple docstring"""


														_a     					=    list(iterable or [] )
														_a     					=    []







							def __len__(  self	:  str )      ->							int:


														"""simple docstring"""


														return len(self._stacka ) + len(self._stacka )







							def __repr__(  self	:  Dict )      ->							str:


														"""simple docstring"""


														return F'Queue({tuple(self._stacka[::-1] + self._stacka )})'







							def        __lowerCAmelCase      (  self	:  List[Any]							,      lowerCAmelCase_	:  _T )      ->							None:


														"""simple docstring"""


														self._stacka.append(lowerCAmelCase_ )







							def        __lowerCAmelCase      (  self	:  str )      ->							_T:


														"""simple docstring"""


														_a     					=    self._stacka.pop
														_a     					=    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 ..utils import DummyObject, requires_backends

class       A   (		metaclass=_a   ):
							lowercase_          =    ['torch', 'scipy']







							def __init__(  self	:  Tuple							,      *lowerCAmelCase_	:  str							,      **lowerCAmelCase_	:  Any )      ->							Tuple:


														"""simple docstring"""


														requires_backends(self							,      ['''torch''', '''scipy'''] )







							@classmethod
							def        __lowerCAmelCase      (  cls	:  Dict							,      *lowerCAmelCase_	:  Dict							,      **lowerCAmelCase_	:  str )      ->							Tuple:


														"""simple docstring"""


														requires_backends(cls							,      ['''torch''', '''scipy'''] )







							@classmethod
							def        __lowerCAmelCase      (  cls	:  Optional[int]							,      *lowerCAmelCase_	:  str							,      **lowerCAmelCase_	:  List[str] )      ->							str:


														"""simple docstring"""


														requires_backends(cls							,      ['''torch''', '''scipy'''] )

