

class 							A_				:






     class 							A_				:
          _lowercase    :  Dict          =			'_prev', '_data', '_next'


          def __init__(							self    :	List[Any]    ,						UpperCAmelCase    :	Tuple    ,						UpperCAmelCase    :	Optional[Any]    ,						UpperCAmelCase    :	str      )							->			Dict:
           __lowerCAmelCase:     str     			=   link_p
           __lowerCAmelCase:     Dict     			=   element
           __lowerCAmelCase:     List[Any]     			=   link_n


          def 						UpperCAmelCase						(							self    :	List[Any]      )							->			List[Any]:
           return (
               F''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
           )







     def __init__(							self    :	Optional[Any]      )							->			List[Any]:
      __lowerCAmelCase:     Optional[int]     			=   self._Node(UpperCAmelCase    ,						UpperCAmelCase    ,						UpperCAmelCase      )
      __lowerCAmelCase:     Optional[Any]     			=   self._Node(UpperCAmelCase    ,						UpperCAmelCase    ,						UpperCAmelCase      )
      __lowerCAmelCase:     str     			=   self._trailer
      __lowerCAmelCase:     List[Any]     			=   self._header
      __lowerCAmelCase:     List[Any]     			=   0


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


     def 						UpperCAmelCase						(							self    :	List[str]      )							->			Tuple:
      return self.__len__() == 0


     def 						UpperCAmelCase						(							self    :	List[Any]    ,						UpperCAmelCase    :	Dict    ,						UpperCAmelCase    :	str    ,						UpperCAmelCase    :	List[str]      )							->			Dict:
      # Create new_node by setting it's prev.link -> header
      # setting it's next.link -> trailer
      __lowerCAmelCase:     Union[str, Any]     			=   self._Node(UpperCAmelCase    ,						UpperCAmelCase    ,						UpperCAmelCase      )
      __lowerCAmelCase:     str     			=   new_node
      __lowerCAmelCase:     Tuple     			=   new_node
      self._size += 1
      return self


     def 						UpperCAmelCase						(							self    :	Tuple    ,						UpperCAmelCase    :	Tuple      )							->			List[Any]:
      __lowerCAmelCase:     int     			=   node._prev
      __lowerCAmelCase:     List[Any]     			=   node._next

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







class 							A_				(	_DoublyLinkedBase      ):


     def 						UpperCAmelCase						(							self    :	Dict      )							->			int:
      if self.is_empty():
       raise Exception('List is empty'      )
      return self._header._next._data


     def 						UpperCAmelCase						(							self    :	Union[str, Any]      )							->			str:
      if self.is_empty():
       raise Exception('List is empty'      )
      return self._trailer._prev._data


     def 						UpperCAmelCase						(							self    :	Dict    ,						UpperCAmelCase    :	Optional[int]      )							->			Optional[Any]:
      return self._insert(self._header    ,						UpperCAmelCase    ,						self._header._next      )


     def 						UpperCAmelCase						(							self    :	int    ,						UpperCAmelCase    :	Any      )							->			str:
      return self._insert(self._trailer._prev    ,						UpperCAmelCase    ,						self._trailer      )


     def 						UpperCAmelCase						(							self    :	str      )							->			Tuple:
      if self.is_empty():
       raise IndexError('remove_first from empty list'      )
      return self._delete(self._header._next      )


     def 						UpperCAmelCase						(							self    :	str      )							->			Dict:
      if self.is_empty():
       raise IndexError('remove_first from empty list'      )
      return self._delete(self._trailer._prev      )








# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

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


_a	 =     {
    '''configuration_tvlt''': ['''TVLT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''TvltConfig'''],
    '''feature_extraction_tvlt''': ['''TvltFeatureExtractor'''],
    '''processing_tvlt''': ['''TvltProcessor'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a	 =     [
      '''TVLT_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''TvltModel''',
      '''TvltForPreTraining''',
      '''TvltForAudioVisualClassification''',
      '''TvltPreTrainedModel''',
  ]

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a	 =     ['''TvltImageProcessor''']


if TYPE_CHECKING:
  from .configuration_tvlt import TVLT_PRETRAINED_CONFIG_ARCHIVE_MAP, TvltConfig
  from .processing_tvlt import TvltProcessor
  from .feature_extraction_tvlt import TvltFeatureExtractor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tvlt import (
        TVLT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TvltForAudioVisualClassification,
        TvltForPreTraining,
        TvltModel,
        TvltPreTrainedModel,
    )

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .image_processing_tvlt import TvltImageProcessor


else:
  import sys

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





