

import os
import sys
from contextlib import contextmanager


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





  class  __lowerCAmelCase     (					ctypes.Structure							):
    # _fields is a specific attr expected by ctypes
    _a									=  [("""size""", ctypes.c_int), ("""visible""", ctypes.c_byte)]
def      a      (			)    ->      List[str]:





      """simple docstring"""



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





      """simple docstring"""



      if os.name == "nt":
            _lowercase	       =CursorInfo()
            _lowercase	       =ctypes.windll.kernelaa.GetStdHandle(-11     )
            ctypes.windll.kernelaa.GetConsoleCursorInfo(A__      ,   ctypes.byref(A__     )     )
            _lowercase	       =True
            ctypes.windll.kernelaa.SetConsoleCursorInfo(A__      ,   ctypes.byref(A__     )     )
      elif os.name == "posix":
            sys.stdout.write('\033[?25h'     )
            sys.stdout.flush()







@contextmanager
def      a      (			)    ->      Union[str, Any]:





      """simple docstring"""



      try:
            hide_cursor()
            yield
      finally:
            show_cursor()





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


lowercase_									=   {
    'configuration_bloom': ['BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP', 'BloomConfig', 'BloomOnnxConfig'],
}
try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   ['BloomTokenizerFast']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   [
      'BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST',
      'BloomForCausalLM',
      'BloomModel',
      'BloomPreTrainedModel',
      'BloomForSequenceClassification',
      'BloomForTokenClassification',
      'BloomForQuestionAnswering',
  ]

if TYPE_CHECKING:
  from .configuration_bloom import BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP, BloomConfig, BloomOnnxConfig

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_bloom_fast import BloomTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_bloom import (
        BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST,
        BloomForCausalLM,
        BloomForQuestionAnswering,
        BloomForSequenceClassification,
        BloomForTokenClassification,
        BloomModel,
        BloomPreTrainedModel,
    )

else:
  import sys

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


