"""simple docstring"""





import os
import sys
from contextlib import contextmanager


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


       class      UpperCAmelCase_	(    ctypes.Structure):
             # _fields is a specific attr expected by ctypes
             lowerCamelCase__		:    Any   =  [("size", ctypes.c_int), ("visible", ctypes.c_byte)]





def 				a_     (      ):





       '''simple docstring'''

       if os.name == "nt":
              lowercase__			:		Any       =	CursorInfo()
              lowercase__			:		Tuple       =	ctypes.windll.kernelaa.GetStdHandle(-11     )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(_lowerCAmelCase   , ctypes.byref(_lowerCAmelCase     )     )
              lowercase__			:		List[Any]       =	False
              ctypes.windll.kernelaa.SetConsoleCursorInfo(_lowerCAmelCase   , ctypes.byref(_lowerCAmelCase     )     )
       elif os.name == "posix":
              sys.stdout.write('\033[?25l'     )
              sys.stdout.flush()





def 				a_     (      ):





       '''simple docstring'''

       if os.name == "nt":
              lowercase__			:		Dict       =	CursorInfo()
              lowercase__			:		List[str]       =	ctypes.windll.kernelaa.GetStdHandle(-11     )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(_lowerCAmelCase   , ctypes.byref(_lowerCAmelCase     )     )
              lowercase__			:		int       =	True
              ctypes.windll.kernelaa.SetConsoleCursorInfo(_lowerCAmelCase   , ctypes.byref(_lowerCAmelCase     )     )
       elif os.name == "posix":
              sys.stdout.write('\033[?25h'     )
              sys.stdout.flush()






@contextmanager
def 				a_     (      ):





       '''simple docstring'''

       try:
              hide_cursor()
              yield
       finally:
              show_cursor()






'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCAmelCase									=   {
    '''configuration_bigbird_pegasus''': [
        '''BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''BigBirdPegasusConfig''',
        '''BigBirdPegasusOnnxConfig''',
    ],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase									=   [
							    '''BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''BigBirdPegasusForCausalLM''',
							    '''BigBirdPegasusForConditionalGeneration''',
							    '''BigBirdPegasusForQuestionAnswering''',
							    '''BigBirdPegasusForSequenceClassification''',
							    '''BigBirdPegasusModel''',
							    '''BigBirdPegasusPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_bigbird_pegasus import (
							    BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    BigBirdPegasusConfig,
							    BigBirdPegasusOnnxConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_bigbird_pegasus import (
														    BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST,
														    BigBirdPegasusForCausalLM,
														    BigBirdPegasusForConditionalGeneration,
														    BigBirdPegasusForQuestionAnswering,
														    BigBirdPegasusForSequenceClassification,
														    BigBirdPegasusModel,
														    BigBirdPegasusPreTrainedModel,
														)


else:
							import sys

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




