




from typing import TYPE_CHECKING

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


UpperCamelCase__         =      {
    'configuration_groupvit': [
        'GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'GroupViTConfig',
        'GroupViTOnnxConfig',
        'GroupViTTextConfig',
        'GroupViTVisionConfig',
    ],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase__         =      [
         'GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
         'GroupViTModel',
         'GroupViTPreTrainedModel',
         'GroupViTTextModel',
         'GroupViTVisionModel',
     ]

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase__         =      [
         'TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
         'TFGroupViTModel',
         'TFGroupViTPreTrainedModel',
         'TFGroupViTTextModel',
         'TFGroupViTVisionModel',
     ]

if TYPE_CHECKING:
     from .configuration_groupvit import (
         GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
         GroupViTConfig,
         GroupViTOnnxConfig,
         GroupViTTextConfig,
         GroupViTVisionConfig,
     )

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_groupvit import (
              GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
              GroupViTModel,
              GroupViTPreTrainedModel,
              GroupViTTextModel,
              GroupViTVisionModel,
          )

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_groupvit import (
              TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
              TFGroupViTModel,
              TFGroupViTPreTrainedModel,
              TFGroupViTTextModel,
              TFGroupViTVisionModel,
          )

else:
     import sys

     UpperCamelCase__         =      _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)










import enum
import shutil
import sys


UpperCamelCase__      ,     UpperCamelCase__         =      shutil.get_terminal_size()

UpperCamelCase__         =      {"""UP""": """A""", """DOWN""": """B""", """RIGHT""": """C""", """LEFT""": """D"""}
class       a__   ( enum.Enum				):
						_a							:   Any =   0
						_a							:   Dict =   1







def      _a				(						SCREAMING_SNAKE_CASE_							:    Tuple				,				SCREAMING_SNAKE_CASE_							:    Dict=""					):
					sys.stdout.write(str(SCREAMING_SNAKE_CASE_					) + end					)
					sys.stdout.flush()







def      _a				(						SCREAMING_SNAKE_CASE_							:    Any				,				SCREAMING_SNAKE_CASE_							:    Union[str, Any]				,				SCREAMING_SNAKE_CASE_							:    str=""					):
					forceWrite(F"""\u001b[{color}m{content}\u001b[0m"""				,				SCREAMING_SNAKE_CASE_					)







def      _a				(						):
					forceWrite("\r"					)







def      _a				(						SCREAMING_SNAKE_CASE_							:    int				,				SCREAMING_SNAKE_CASE_							:    str					):
					forceWrite(F"""\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"""					)







def      _a				(						):
					forceWrite(" " * TERMINAL_WIDTH					)
					reset_cursor()







def      _a				(						):
					reset_cursor()
					forceWrite("-" * TERMINAL_WIDTH					)




