



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case__					:     Dict    		=   {
    """configuration_luke""": ["""LUKE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LukeConfig"""],
    """tokenization_luke""": ["""LukeTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	snake_case__					:     List[str]    		=   [
	    """LUKE_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """LukeForEntityClassification""",
	    """LukeForEntityPairClassification""",
	    """LukeForEntitySpanClassification""",
	    """LukeForMultipleChoice""",
	    """LukeForQuestionAnswering""",
	    """LukeForSequenceClassification""",
	    """LukeForTokenClassification""",
	    """LukeForMaskedLM""",
	    """LukeModel""",
	    """LukePreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_luke import LUKE_PRETRAINED_CONFIG_ARCHIVE_MAP, LukeConfig
	from .tokenization_luke import LukeTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_luke import (
		    LUKE_PRETRAINED_MODEL_ARCHIVE_LIST,
		    LukeForEntityClassification,
		    LukeForEntityPairClassification,
		    LukeForEntitySpanClassification,
		    LukeForMaskedLM,
		    LukeForMultipleChoice,
		    LukeForQuestionAnswering,
		    LukeForSequenceClassification,
		    LukeForTokenClassification,
		    LukeModel,
		    LukePreTrainedModel,
		)

else:
	import sys

	snake_case__					:     Optional[int]    		=   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
	import ctypes
	import msvcrt  # noqa

	class   _A   ( ctypes.Structure	):


							'''simple docstring'''





							_snake_case			:     Optional[Any]      							=      [("""size""", ctypes.c_int), ("""visible""", ctypes.c_byte)]



def    snake_case_				(    ):
	if os.name == "nt":
		__lowercase		       =			CursorInfo()
		__lowercase		       =			ctypes.windll.kernelaa.GetStdHandle(-1_1   )
		ctypes.windll.kernelaa.GetConsoleCursorInfo(_SCREAMING_SNAKE_CASE  ,	ctypes.byref(_SCREAMING_SNAKE_CASE   )   )
		__lowercase		       =			False
		ctypes.windll.kernelaa.SetConsoleCursorInfo(_SCREAMING_SNAKE_CASE  ,	ctypes.byref(_SCREAMING_SNAKE_CASE   )   )
	elif os.name == "posix":
		sys.stdout.write("\033[?25l"   )
		sys.stdout.flush()



def    snake_case_				(    ):
	if os.name == "nt":
		__lowercase		       =			CursorInfo()
		__lowercase		       =			ctypes.windll.kernelaa.GetStdHandle(-1_1   )
		ctypes.windll.kernelaa.GetConsoleCursorInfo(_SCREAMING_SNAKE_CASE  ,	ctypes.byref(_SCREAMING_SNAKE_CASE   )   )
		__lowercase		       =			True
		ctypes.windll.kernelaa.SetConsoleCursorInfo(_SCREAMING_SNAKE_CASE  ,	ctypes.byref(_SCREAMING_SNAKE_CASE   )   )
	elif os.name == "posix":
		sys.stdout.write("\033[?25h"   )
		sys.stdout.flush()



@contextmanager
def    snake_case_				(    ):
	try:
		hide_cursor()
		yield
	finally:
		show_cursor()



