
"""simple docstring"""



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

UpperCAmelCase__        =					TypeVar('_T')

class  lowerCAmelCase__							(		Generic[_T]      ):







     def __init__(				self     :     Optional[int]       , _lowerCamelCase     :     Iterable[_T] | None = None     ):
       _snake_case   	=			list(iterable or []     )
       _snake_case   	=			[]







     def __len__(				self     :     Any     ):
       return len(self._stacka     ) + len(self._stacka     )







     def __repr__(				self     :     List[str]     ):
       return f'''Queue({tuple(self._stacka[::-1] + self._stacka     )})'''







     def 	lowercase      (				self     :     Any       , _lowerCamelCase     :     _T     ):
       self._stacka.append(lowerCAmelCase__     )







     def 	lowercase      (				self     :     Optional[int]     ):
       _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 ..utils import DummyObject, requires_backends
class 							__lowerCAmelCase	(       metaclass=__magic_name__					):






       """simple docstring"""
       _snake_case      :	Dict									=       ['transformers', 'torch', 'note_seq']





       def __init__(				self  :						Tuple			,					*lowerCAmelCase__  :						List[str]			,					**lowerCAmelCase__  :						Optional[int]	)       ->	int:

            '''simple docstring'''




            requires_backends(self			,					['''transformers''', '''torch''', '''note_seq''']	)





       @classmethod
       def snake_case__		(				cls  :						Dict			,					*lowerCAmelCase__  :						Optional[Any]			,					**lowerCAmelCase__  :						Optional[int]	)       ->	Any:

            '''simple docstring'''




            requires_backends(cls			,					['''transformers''', '''torch''', '''note_seq''']	)







       @classmethod
       def snake_case__		(				cls  :						str			,					*lowerCAmelCase__  :						Any			,					**lowerCAmelCase__  :						List[Any]	)       ->	Tuple:

            '''simple docstring'''




            requires_backends(cls			,					['''transformers''', '''torch''', '''note_seq''']	)



