





'''simple docstring'''


import enum
import shutil
import sys


a__						,		a__			:					List[str]       						=						shutil.get_terminal_size()

a__			:					Any       						=						{'UP': 'A', 'DOWN': 'B', 'RIGHT': 'C', 'LEFT': 'D'}






class     lowerCAmelCase__ (				enum.Enum    ):

       '''simple docstring'''
       _lowerCamelCase								=0
       _lowerCamelCase								=1


def       __snake_case		( SCREAMING_SNAKE_CASE_ :			List[str]			,	SCREAMING_SNAKE_CASE_ :			Union[str, Any]="" )							->     Tuple:

       """simple docstring"""


       sys.stdout.write(str(SCREAMING_SNAKE_CASE_ ) + end )
       sys.stdout.flush()
def       __snake_case		( SCREAMING_SNAKE_CASE_ :			Any			,	SCREAMING_SNAKE_CASE_ :			Union[str, Any]			,	SCREAMING_SNAKE_CASE_ :			Optional[int]="" )							->     str:

       """simple docstring"""


       forceWrite(f"\u001b[{color}m{content}\u001b[0m"			,	SCREAMING_SNAKE_CASE_ )
def       __snake_case		( )							->     Tuple:

       """simple docstring"""


       forceWrite('''\r''' )
def       __snake_case		( SCREAMING_SNAKE_CASE_ :			int			,	SCREAMING_SNAKE_CASE_ :			str )							->     List[Any]:

       """simple docstring"""


       forceWrite(f"\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}" )
def       __snake_case		( )							->     Union[str, Any]:

       """simple docstring"""


       forceWrite(''' ''' * TERMINAL_WIDTH )
       reset_cursor()

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

       """simple docstring"""


       reset_cursor()
       forceWrite('''-''' * TERMINAL_WIDTH )










"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_lowerCAmelCase	:	Tuple				=      {
    """configuration_lxmert""": ["""LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LxmertConfig"""],
    """tokenization_lxmert""": ["""LxmertTokenizer"""],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase	:	int				=      ["""LxmertTokenizerFast"""]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase	:	Tuple				=      [
     """LxmertEncoder""",
     """LxmertForPreTraining""",
     """LxmertForQuestionAnswering""",
     """LxmertModel""",
     """LxmertPreTrainedModel""",
     """LxmertVisualFeatureEncoder""",
     """LxmertXLayer""",
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _lowerCAmelCase	:	Optional[int]				=      [
     """TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
     """TFLxmertForPreTraining""",
     """TFLxmertMainLayer""",
     """TFLxmertModel""",
     """TFLxmertPreTrainedModel""",
     """TFLxmertVisualFeatureEncoder""",
 ]


if TYPE_CHECKING:
 from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
 from .tokenization_lxmert import LxmertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_lxmert_fast import LxmertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_lxmert import (
      LxmertEncoder,
      LxmertForPreTraining,
      LxmertForQuestionAnswering,
      LxmertModel,
      LxmertPreTrainedModel,
      LxmertVisualFeatureEncoder,
      LxmertXLayer,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_lxmert import (
      TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFLxmertForPreTraining,
      TFLxmertMainLayer,
      TFLxmertModel,
      TFLxmertPreTrainedModel,
      TFLxmertVisualFeatureEncoder,
  )

else:
 import sys

 _lowerCAmelCase	:	Any				=      _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


