


import enum
import inspect
import warnings
from functools import wraps
from typing import Callable, Optional

from .logging import get_logger


snake_case       :					Any        =  set()
snake_case       :					Tuple        =  get_logger(__name__)
def        __lowerCamelCase		(				UpperCAmelCase_		:	Optional[str] = None		):




      """simple docstring"""





      def decorator(UpperCAmelCase_		:	Callable		):
            global _emitted_deprecation_warnings

            if inspect.isclass(UpperCAmelCase_		):
                  a		:List[Any]											= deprecated_class_or_function.__init__
                  a		:Dict											= deprecated_class_or_function.__name__
            else:
                  a		:List[str]											= deprecated_class_or_function
                  a		:Dict											= deprecated_function.__name__
                  # Support deprecating __init__ class method: class name instead
                  a		:Tuple											= name if name != '''__init__''' else deprecated_function.__qualname__.split('''.'''		)[-2]

            a		:Any											= (
                F'''{name} is deprecated and will be removed in the next major version of datasets.''' + F''' {help_message}'''
                if help_message
                else ''''''
            )

            @wraps(UpperCAmelCase_		)
            def wrapper(*UpperCAmelCase_		:	Tuple				,						**UpperCAmelCase_		:	str		):
                  a		:Dict											= hash(UpperCAmelCase_		)
                  if func_hash not in _emitted_deprecation_warnings:
                        warnings.warn(UpperCAmelCase_				,						category=UpperCAmelCase_				,						stacklevel=2		)
                        _emitted_deprecation_warnings.add(UpperCAmelCase_		)
                  return deprecated_function(*UpperCAmelCase_				,						**UpperCAmelCase_		)

            a		:Dict											= '''deprecated'''

            if inspect.isclass(UpperCAmelCase_		):
                  a		:Optional[int]											= wrapper
                  return deprecated_class_or_function
            else:
                  return wrapper

      return decorator







class 	_snake_case						(   enum.EnumMeta							):




 def __getattribute__(	cls      ,						_lowerCamelCase					):
       a		:int											= super().__getattribute__(_lowerCamelCase					)
       if isinstance(_lowerCamelCase      ,						enum.Enum					) and obj._on_access:
             obj._on_access()
       return obj




 def __getitem__(	cls      ,						_lowerCamelCase					):
       a		:Optional[int]											= super().__getitem__(_lowerCamelCase					)
       if member._on_access:
             member._on_access()
       return member




 def __call__(	cls      ,						_lowerCamelCase      ,						_lowerCamelCase=None      ,						*, _lowerCamelCase=None      ,						_lowerCamelCase=None      ,						_lowerCamelCase=None      ,						_lowerCamelCase=1					):
       a		:Dict											= super().__call__(_lowerCamelCase      ,						_lowerCamelCase      ,						module=_lowerCamelCase      ,						qualname=_lowerCamelCase      ,						type=_lowerCamelCase      ,						start=_lowerCamelCase					)
       if isinstance(_lowerCamelCase      ,						enum.Enum					) and obj._on_access:
             obj._on_access()
       return obj







class 	_snake_case						(   enum.Enum		,					metaclass=_snake_case							):




 def __new__(	cls      ,						_lowerCamelCase					):
       a		:str											= object.__new__(cls					)
       a		:int											= value
       a		:Optional[int]											= member.deprecate
       return member




 @property
 def  SCREAMING_SNAKE_CASE__       (	self					):
       return ""




 def  SCREAMING_SNAKE_CASE__       (	self					):
       a		:Optional[Any]											= F''' {self.help_message}''' if self.help_message else ''''''
       warnings.warn(
           F'''\'{self.__objclass__.__name__}\' is deprecated and will be removed in the next major version of datasets.'''
           + help_message      ,						_lowerCamelCase      ,						stacklevel=3      ,						)









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


snake_case       :					Dict        =  {
    '''configuration_align''': [
        '''ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AlignConfig''',
        '''AlignTextConfig''',
        '''AlignVisionConfig''',
    ],
    '''processing_align''': ['''AlignProcessor'''],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     snake_case       :					List[str]        =  [
         '''ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''AlignModel''',
         '''AlignPreTrainedModel''',
         '''AlignTextModel''',
         '''AlignVisionModel''',
     ]

if TYPE_CHECKING:
     from .configuration_align import (
         ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
         AlignConfig,
         AlignTextConfig,
         AlignVisionConfig,
     )
     from .processing_align import AlignProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_align import (
              ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
              AlignModel,
              AlignPreTrainedModel,
              AlignTextModel,
              AlignVisionModel,
          )

else:
     import sys

     snake_case       :					int        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





