




'''simple docstring'''





class     UpperCamelCase					:




  class     UpperCamelCase					:
    a    :Dict      					=				'_prev', '_data', '_next'



    def __init__( self		,    __lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   ):







        '''simple docstring'''


        _a							:       List[str]       					=			link_p
        _a							:       Union[str, Any]       					=			element
        _a							:       Union[str, Any]       					=			link_n



    def 						a_       ( self   ):







        '''simple docstring'''


        return (
            f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
        )






  def __init__( self   ):







      '''simple docstring'''


      _a							:       Any       					=			self._Node(__lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   )
      _a							:       Dict       					=			self._Node(__lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   )
      _a							:       List[Any]       					=			self._trailer
      _a							:       Union[str, Any]       					=			self._header
      _a							:       List[Any]       					=			0



  def __len__( self   ):







      '''simple docstring'''


      return self._size



  def 						a_       ( self   ):







      '''simple docstring'''


      return self.__len__() == 0



  def 						a_       ( self		,    __lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   ):







      '''simple docstring'''


      _a							:       Any       					=			self._Node(__lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   )
      _a							:       Any       					=			new_node
      _a							:       Any       					=			new_node
      self._size += 1
      return self



  def 						a_       ( self		,    __lowerCAmelCase   ):







      '''simple docstring'''


      _a							:       Any       					=			node._prev
      _a							:       Optional[Any]       					=			node._next

      _a							:       Dict       					=			successor
      _a							:       Any       					=			predecessor
      self._size -= 1
      _a							:       Union[str, Any]       					=			node._data
      _a							:       Optional[Any]       					=			None
      del node
      return temp






class     UpperCamelCase					(  _DoublyLinkedBase					):



  def 						a_       ( self   ):







      '''simple docstring'''


      if self.is_empty():
          raise Exception("""List is empty"""   )
      return self._header._next._data



  def 						a_       ( self   ):







      '''simple docstring'''


      if self.is_empty():
          raise Exception("""List is empty"""   )
      return self._trailer._prev._data



  def 						a_       ( self		,    __lowerCAmelCase   ):







      '''simple docstring'''


      return self._insert(self._header		,    __lowerCAmelCase		,    self._header._next   )



  def 						a_       ( self		,    __lowerCAmelCase   ):







      '''simple docstring'''


      return self._insert(self._trailer._prev		,    __lowerCAmelCase		,    self._trailer   )



  def 						a_       ( self   ):







      '''simple docstring'''


      if self.is_empty():
          raise IndexError("""remove_first from empty list"""   )
      return self._delete(self._header._next   )



  def 						a_       ( self   ):







      '''simple docstring'''


      if self.is_empty():
          raise IndexError("""remove_first from empty list"""   )
      return self._delete(self._trailer._prev   )








'''simple docstring'''





from typing import TYPE_CHECKING

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


a		:  Dict   			=			{
    '''configuration_mobilevitv2''': [
        '''MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''MobileViTV2Config''',
        '''MobileViTV2OnnxConfig''',
    ],
}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a		:  List[str]   			=			[
      '''MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''MobileViTV2ForImageClassification''',
      '''MobileViTV2ForSemanticSegmentation''',
      '''MobileViTV2Model''',
      '''MobileViTV2PreTrainedModel''',
  ]

if TYPE_CHECKING:
  from .configuration_mobilevitva import (
      MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
      MobileViTVaConfig,
      MobileViTVaOnnxConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_mobilevitva import (
        MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
        MobileViTVaForImageClassification,
        MobileViTVaForSemanticSegmentation,
        MobileViTVaModel,
        MobileViTVaPreTrainedModel,
    )

else:
  import sys

  a		:  Dict   			=			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


