

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'''



       __lowerCamelCase			:      Union[str, Any]					=   [('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]







def       lowercase					(	)				->			Optional[Any]:





    '''simple docstring'''




    if os.name == "nt":
        snake_case							:		int        =		CursorInfo()
        snake_case							:		Union[str, Any]        =		ctypes.windll.kernelaa.GetStdHandle(-11		)
        ctypes.windll.kernelaa.GetConsoleCursorInfo(__A ,    ctypes.byref(__A		)		)
        snake_case							:		Union[str, Any]        =		False
        ctypes.windll.kernelaa.SetConsoleCursorInfo(__A ,    ctypes.byref(__A		)		)
    elif os.name == "posix":
        sys.stdout.write("""\033[?25l"""		)
        sys.stdout.flush()







def       lowercase					(	)				->			Tuple:





    '''simple docstring'''




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







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





    '''simple docstring'''




    try:
        hide_cursor()
        yield
    finally:
        show_cursor()








from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowercase    	=		logging.get_logger(__name__)



class      _UpperCAmelCase      (							A__  ):
     UpperCamelCase__		     =					'''timm_backbone'''




     def __init__(					self			,    a__=None			,    a__=3			,    a__=True			,    a__=True			,    a__=None			,    **a__			,    ):
         super().__init__(**a__)
         A__					=       backbone
         A__					=       num_channels
         A__					=       features_only
         A__					=       use_pretrained_backbone
         A__					=       True
         A__					=       out_indices if out_indices is not None else (-1,)
