





from typing import List

from .keymap import KEYMAP, get_character




def  __UpperCAmelCase(   lowercase_   ):

       def decorator(lowercase_   ):
              _lowerCamelCase				:  Tuple						=		getattr(lowercase_			,     '''handle_key'''			,     []   )
              handle += [key]
              setattr(lowercase_			,     '''handle_key'''			,     lowercase_   )
              return func

       return decorator




def  __UpperCAmelCase(   *lowercase_   ):

       def decorator(lowercase_   ):
              _lowerCamelCase				:  List[str]						=		getattr(lowercase_			,     '''handle_key'''			,     []   )
              handle += keys
              setattr(lowercase_			,     '''handle_key'''			,     lowercase_   )
              return func

       return decorator







class       __A							(   lowerCamelCase__	):




      """simple docstring"""







      def __new__(		cls   ,				a__   ,				a__   ,				a__):



             """simple docstring"""





             _lowerCamelCase				:  List[Any]						=		super().__new__(cls   ,				a__   ,				a__   ,				a__)
             if not hasattr(a__   ,				'''key_handler'''):
                    setattr(a__   ,				'''key_handler'''   ,				{})
             setattr(a__   ,				'''handle_input'''   ,				KeyHandler.handle_input)

             for value in attrs.values():
                    _lowerCamelCase				:  List[Any]						=		getattr(a__   ,				'''handle_key'''   ,				[])
                    for key in handled_keys:
                           _lowerCamelCase				:  str						=		value
             return new_cls



      @staticmethod
      def 					__snake_case      (		cls):



             """simple docstring"""





             _lowerCamelCase				:  int						=		get_character()
             if char != KEYMAP["undefined"]:
                    _lowerCamelCase				:  List[Any]						=		ord(a__)
             _lowerCamelCase				:  int						=		cls.key_handler.get(a__)
             if handler:
                    _lowerCamelCase				:  List[Any]						=		char
                    return handler(cls)
             else:
                    return None




def  __UpperCAmelCase(   cls   ):
       return KeyHandler(cls.__name__			,     cls.__bases__			,     cls.__dict__.copy()   )








import warnings

from ...utils import logging
from .image_processing_deit import DeiTImageProcessor


_lowerCamelCase      							=   logging.get_logger(__name__)







class       __A							(   lowerCamelCase__	):




      """simple docstring"""







      def __init__(		self   ,				*a__   ,				**a__):



             """simple docstring"""





             warnings.warn(
                 '''The class DeiTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'''
                 ''' use DeiTImageProcessor instead.'''   ,				a__   ,				)
             super().__init__(*a__   ,				**a__)

