"""simple docstring"""





class 					UpperCAmelCase_     :


      class 					UpperCAmelCase_     :
            lowerCamelCase__		:   List[Any]			  =  "_prev", "_data", "_next"


            def __init__(       self		,      a		,      a		,      a							)	-> List[str]:
                   lowercase__      :		Union[str, Any]          =     link_p
                   lowercase__      :		List[Any]          =     element
                   lowercase__      :		str          =     link_n


            def 		_UpperCAmelCase	(       self							)	-> Optional[Any]:
                   return (
                       f""" Prev -> {self._prev is not None}, Next -> {self._next is not None}"""
                   )





      def __init__(       self							)	-> Union[str, Any]:
             lowercase__      :		List[Any]          =     self._Node(a		,      a		,      a							)
             lowercase__      :		List[Any]          =     self._Node(a		,      a		,      a							)
             lowercase__      :		Any          =     self._trailer
             lowercase__      :		Any          =     self._header
             lowercase__      :		Optional[Any]          =     0


      def __len__(       self							)	-> List[str]:
             return self._size


      def 		_UpperCAmelCase	(       self							)	-> Union[str, Any]:
             return self.__len__() == 0


      def 		_UpperCAmelCase	(       self		,      a		,      a		,      a							)	-> str:
             # Create new_node by setting it's prev.link -> header
             # setting it's next.link -> trailer
             lowercase__      :		str          =     self._Node(a		,      a		,      a							)
             lowercase__      :		List[str]          =     new_node
             lowercase__      :		List[str]          =     new_node
             self._size += 1
             return self


      def 		_UpperCAmelCase	(       self		,      a							)	-> str:
             lowercase__      :		str          =     node._prev
             lowercase__      :		Optional[int]          =     node._next

             lowercase__      :		Any          =     successor
             lowercase__      :		Dict          =     predecessor
             self._size -= 1
             lowercase__      :		Optional[Any]          =     node._data
             lowercase__      :		List[Any]          =     None
             del node
             return temp





class 					UpperCAmelCase_     (   _DoublyLinkedBase):


      def 		_UpperCAmelCase	(       self							)	-> List[Any]:
             if self.is_empty():
                    raise Exception('List is empty'							)
             return self._header._next._data


      def 		_UpperCAmelCase	(       self							)	-> str:
             if self.is_empty():
                    raise Exception('List is empty'							)
             return self._trailer._prev._data


      def 		_UpperCAmelCase	(       self		,      a							)	-> Any:
             return self._insert(self._header		,      a		,      self._header._next							)


      def 		_UpperCAmelCase	(       self		,      a							)	-> str:
             return self._insert(self._trailer._prev		,      a		,      self._trailer							)


      def 		_UpperCAmelCase	(       self							)	-> List[Any]:
             if self.is_empty():
                    raise IndexError('remove_first from empty list'							)
             return self._delete(self._header._next							)


      def 		_UpperCAmelCase	(       self							)	-> Optional[Any]:
             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_tokenizers_available, is_torch_available


_UpperCamelCase       :						int     =   {
    "configuration_retribert": ["RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "RetriBertConfig"],
    "tokenization_retribert": ["RetriBertTokenizer"],
}

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _UpperCamelCase       :						Tuple     =   ["RetriBertTokenizerFast"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _UpperCamelCase       :						int     =   [
           "RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "RetriBertModel",
           "RetriBertPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_retribert import RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RetriBertConfig
       from .tokenization_retribert import RetriBertTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_retribert_fast import RetriBertTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_retribert import (
                  RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  RetriBertModel,
                  RetriBertPreTrainedModel,
              )

else:
       import sys

       _UpperCamelCase       :						Tuple     =   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)

