






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

from .logging import get_logger


__UpperCAmelCase      =				set()
__UpperCAmelCase      =				get_logger(__name__)





def 						A_					(						lowercase_ = None			)				->List[str]:







 """simple docstring"""

 def decorator(lowercase_			):
  global _emitted_deprecation_warnings

  if inspect.isclass(lowercase_			):
   SCREAMING_SNAKE_CASE				    =		deprecated_class_or_function.__init__
   SCREAMING_SNAKE_CASE				    =		deprecated_class_or_function.__name__
  else:
   SCREAMING_SNAKE_CASE				    =		deprecated_class_or_function
   SCREAMING_SNAKE_CASE				    =		deprecated_function.__name__
   # Support deprecating __init__ class method: class name instead
   SCREAMING_SNAKE_CASE				    =		name if name != '__init__' else deprecated_function.__qualname__.split('.'			)[-2]

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

  @wraps(lowercase_			)
  def wrapper(*lowercase_	,  **lowercase_			):
   SCREAMING_SNAKE_CASE				    =		hash(lowercase_			)
   if func_hash not in _emitted_deprecation_warnings:
    warnings.warn(lowercase_	,  category=lowercase_	,  stacklevel=2			)
    _emitted_deprecation_warnings.add(lowercase_			)
   return deprecated_function(*lowercase_	,  **lowercase_			)

  SCREAMING_SNAKE_CASE				    =		'deprecated'

  if inspect.isclass(lowercase_			):
   SCREAMING_SNAKE_CASE				    =		wrapper
   return deprecated_class_or_function
  else:
   return wrapper

 return decorator
class 	a_(		enum.EnumMeta	):



     """simple docstring"""



     def __getattribute__(		cls					:	Dict  ,  lowerCAmelCase__					:	str)							->	str:

      """simple docstring"""
      SCREAMING_SNAKE_CASE				    =		super().__getattribute__(lowerCAmelCase__)
      if isinstance(lowerCAmelCase__  ,  enum.Enum) and obj._on_access:
       obj._on_access()
      return obj





     def __getitem__(		cls					:	Optional[int]  ,  lowerCAmelCase__					:	Optional[Any])							->	Dict:

      """simple docstring"""
      SCREAMING_SNAKE_CASE				    =		super().__getitem__(lowerCAmelCase__)
      if member._on_access:
       member._on_access()
      return member





     def __call__(		cls					:	Dict  ,  lowerCAmelCase__					:	int  ,  lowerCAmelCase__					:	List[Any]=None  ,  *, lowerCAmelCase__					:	int=None  ,  lowerCAmelCase__					:	Dict=None  ,  lowerCAmelCase__					:	Tuple=None  ,  lowerCAmelCase__					:	Dict=1)							->	Dict:

      """simple docstring"""
      SCREAMING_SNAKE_CASE				    =		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 	a_(		enum.Enum			,							metaclass=lowercase__	):



     """simple docstring"""



     def __new__(		cls					:	Optional[Any]  ,  lowerCAmelCase__					:	Tuple)							->	Any:

      """simple docstring"""
      SCREAMING_SNAKE_CASE				    =		object.__new__(cls)
      SCREAMING_SNAKE_CASE				    =		value
      SCREAMING_SNAKE_CASE				    =		member.deprecate
      return member





     @property
     def     __UpperCamelCase						(		self					:	List[Any])							->	Any:

      """simple docstring"""
      return ""





     def     __UpperCamelCase						(		self					:	List[Any])							->	List[str]:

      """simple docstring"""
      SCREAMING_SNAKE_CASE				    =		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  ,  )











'''simple docstring'''


from math import pi




def  __a			(  UpperCAmelCase     )   ->float:



	"""simple docstring"""







	return degree / (180 / pi)


if __name__ == "__main__":
				from doctest import testmod

				testmod()

