

"""simple docstring"""


from __future__ import annotations

from typing import Any





class lowerCamelCase__   :



    '''simple docstring'''




    def __init__( self ,lowerCamelCase_ = 6    )    ->      None:
          A				  =		None
          A				  =		None
          self.create_linked_list(__a    )




    def UpperCamelCase__		( self ,lowerCamelCase_    )    ->      None:
          A				  =		Node()
          A				  =		current_node
          A				  =		current_node
          A				  =		current_node
          for _ in range(1 ,__a    ):
                A				  =		Node()
                A				  =		current_node
                A				  =		previous_node
                A				  =		current_node
          A				  =		self.front
          A				  =		previous_node




    def UpperCamelCase__		( self    )    ->      bool:
          return (
              self.front == self.rear
              and self.front is not None
              and self.front.data is None
          )




    def UpperCamelCase__		( self    )    ->      Any | None:
          self.check_can_perform_operation()
          return self.front.data if self.front else None




    def UpperCamelCase__		( self ,lowerCamelCase_    )    ->      None:
          if self.rear is None:
                return

          self.check_is_full()
          if not self.is_empty():
                A				  =		self.rear.next
          if self.rear:
                A				  =		data




    def UpperCamelCase__		( self    )    ->      Any:
          self.check_can_perform_operation()
          if self.rear is None or self.front is None:
                return None
          if self.front == self.rear:
                A				  =		self.front.data
                A				  =		None
                return data

          A				  =		self.front
          A				  =		old_front.next
          A				  =		old_front.data
          A				  =		None
          return data




    def UpperCamelCase__		( self    )    ->      None:
          if self.is_empty():
                raise Exception("""Empty Queue"""    )




    def UpperCamelCase__		( self    )    ->      None:
          if self.rear and self.rear.next == self.front:
                raise Exception("""Full Queue"""    )





class lowerCamelCase__   :



    '''simple docstring'''




    def __init__( self    )    ->      None:
          A				  =		None
          A				  =		None
          A				  =		None


if __name__ == "__main__":
  import doctest

  doctest.testmod()









'''simple docstring'''





from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A__    :   List[str]           =					{
    '''configuration_autoformer''': [
        '''AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AutoformerConfig''',
    ],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    A__    :   Optional[Any]           =					[
        '''AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''AutoformerForPrediction''',
        '''AutoformerModel''',
        '''AutoformerPreTrainedModel''',
    ]


if TYPE_CHECKING:
    from .configuration_autoformer import (
        AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
        AutoformerConfig,
    )

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_autoformer import (
            AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            AutoformerForPrediction,
            AutoformerModel,
            AutoformerPreTrainedModel,
        )

else:
    import sys

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



