





class 				SCREAMING_SNAKE_CASE   :
   class 				SCREAMING_SNAKE_CASE   :
      _UpperCamelCase    :		List[Any] 					=       "_prev", "_data", "_next"


      def __init__(    self			:				Union[str, Any]			,     a			:				Tuple			,     a			:				Optional[Any]			,     a			:				int       )->   Tuple:





        """simple docstring"""







        lowercase__				=  link_p
        lowercase__				=  element
        lowercase__				=  link_n


      def        SCREAMING_SNAKE_CASE_							(    self			:				List[Any]       )->   Tuple:





        """simple docstring"""







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






   def __init__(    self			:				str       )->   Any:





     """simple docstring"""







     lowercase__				=  self._Node(_lowerCamelCase			,     _lowerCamelCase			,     _lowerCamelCase       )
     lowercase__				=  self._Node(_lowerCamelCase			,     _lowerCamelCase			,     _lowerCamelCase       )
     lowercase__				=  self._trailer
     lowercase__				=  self._header
     lowercase__				=  0


   def __len__(    self			:				Tuple       )->   Dict:





     """simple docstring"""







     return self._size


   def        SCREAMING_SNAKE_CASE_							(    self			:				Dict       )->   int:





     """simple docstring"""







     return self.__len__() == 0


   def        SCREAMING_SNAKE_CASE_							(    self			:				Optional[int]			,     a			:				Any			,     a			:				Union[str, Any]			,     a			:				Optional[int]       )->   Optional[int]:





     """simple docstring"""







     lowercase__				=  self._Node(_lowerCamelCase			,     _lowerCamelCase			,     _lowerCamelCase       )
     lowercase__				=  new_node
     lowercase__				=  new_node
     self._size += 1
     return self


   def        SCREAMING_SNAKE_CASE_							(    self			:				str			,     a			:				List[Any]       )->   str:





     """simple docstring"""







     lowercase__				=  node._prev
     lowercase__				=  node._next

     lowercase__				=  successor
     lowercase__				=  predecessor
     self._size -= 1
     lowercase__				=  node._data
     lowercase__				=  lowercase__				=  lowercase__				=  None
     del node
     return temp






class 				SCREAMING_SNAKE_CASE   (_DoublyLinkedBase      ):


   def        SCREAMING_SNAKE_CASE_							(    self			:				int       )->   Optional[Any]:





     """simple docstring"""







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


   def        SCREAMING_SNAKE_CASE_							(    self			:				List[Any]       )->   Optional[int]:





     """simple docstring"""







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


   def        SCREAMING_SNAKE_CASE_							(    self			:				Tuple			,     a			:				Dict       )->   str:





     """simple docstring"""







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


   def        SCREAMING_SNAKE_CASE_							(    self			:				List[Any]			,     a			:				List[Any]       )->   Tuple:





     """simple docstring"""







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


   def        SCREAMING_SNAKE_CASE_							(    self			:				Union[str, Any]       )->   Union[str, Any]:





     """simple docstring"""







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


   def        SCREAMING_SNAKE_CASE_							(    self			:				Optional[int]       )->   List[str]:





     """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


_SCREAMING_SNAKE_CASE    =			{
    '''configuration_deformable_detr''': ['''DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DeformableDetrConfig'''],
}

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_SCREAMING_SNAKE_CASE    =			['''DeformableDetrFeatureExtractor''']
	_SCREAMING_SNAKE_CASE    =			['''DeformableDetrImageProcessor''']

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_SCREAMING_SNAKE_CASE    =			[
	    '''DEFORMABLE_DETR_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''DeformableDetrForObjectDetection''',
	    '''DeformableDetrModel''',
	    '''DeformableDetrPreTrainedModel''',
	]


if TYPE_CHECKING:
	from .configuration_deformable_detr import DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DeformableDetrConfig

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .feature_extraction_deformable_detr import DeformableDetrFeatureExtractor
		from .image_processing_deformable_detr import DeformableDetrImageProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_deformable_detr import (
		    DEFORMABLE_DETR_PRETRAINED_MODEL_ARCHIVE_LIST,
		    DeformableDetrForObjectDetection,
		    DeformableDetrModel,
		    DeformableDetrPreTrainedModel,
		)

else:
	import sys

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





