"""simple docstring"""






from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase__						:						Union[str, Any]		  =			{
    'configuration_informer': [
        'INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'InformerConfig',
    ],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowerCAmelCase__						:						Any		  =			[
          'INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
          'InformerForPrediction',
          'InformerModel',
          'InformerPreTrainedModel',
      ]


if TYPE_CHECKING:
      from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_informer import (
                INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
                InformerForPrediction,
                InformerModel,
                InformerPreTrainedModel,
            )

else:
      import sys

      lowerCAmelCase__						:						List[Any]		  =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




"""simple docstring"""






import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
						import ctypes
						import msvcrt  # noqa
						class        snake_case (				ctypes.Structure       ):




											"""simple docstring"""

											snake_case__       					=				[("size", ctypes.c_int), ("visible", ctypes.c_byte)]



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



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







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



