


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

from .logging import get_logger


lowercase_								=    set()
lowercase_								=    get_logger(__name__)


def 							SCREAMING_SNAKE_CASE					(  _UpperCAmelCase = None				)    ->  Optional[Any]:

						def decorator(_UpperCAmelCase				):
												global _emitted_deprecation_warnings

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

												_a     =			(
												    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							,     **_UpperCAmelCase				):
																		_a     =			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     =			'deprecated'

												if inspect.isclass(_UpperCAmelCase				):
																		_a     =			wrapper
																		return deprecated_class_or_function
												else:
																		return wrapper

						return decorator




class 					_UpperCamelCase (      enum.EnumMeta	):







							'''simple docstring'''







							def __getattribute__(		cls  :				str		,				SCREAMING_SNAKE_CASE_  :				str		):
													_a     =			super().__getattribute__(SCREAMING_SNAKE_CASE_		)
													if isinstance(SCREAMING_SNAKE_CASE_		,				enum.Enum		) and obj._on_access:
																			obj._on_access()
													return obj







							def __getitem__(		cls  :				List[str]		,				SCREAMING_SNAKE_CASE_  :				Union[str, Any]		):
													_a     =			super().__getitem__(SCREAMING_SNAKE_CASE_		)
													if member._on_access:
																			member._on_access()
													return member







							def __call__(		cls  :				Optional[int]		,				SCREAMING_SNAKE_CASE_  :				Any		,				SCREAMING_SNAKE_CASE_  :				str=None		,				*, SCREAMING_SNAKE_CASE_  :				List[Any]=None		,				SCREAMING_SNAKE_CASE_  :				List[str]=None		,				SCREAMING_SNAKE_CASE_  :				Union[str, Any]=None		,				SCREAMING_SNAKE_CASE_  :				Optional[Any]=1		):
													_a     =			super().__call__(SCREAMING_SNAKE_CASE_		,				SCREAMING_SNAKE_CASE_		,				module=SCREAMING_SNAKE_CASE_		,				qualname=SCREAMING_SNAKE_CASE_		,				type=SCREAMING_SNAKE_CASE_		,				start=SCREAMING_SNAKE_CASE_		)
													if isinstance(SCREAMING_SNAKE_CASE_		,				enum.Enum		) and obj._on_access:
																			obj._on_access()
													return obj




class 					_UpperCamelCase (      enum.Enum			,							metaclass=lowerCamelCase__	):







							'''simple docstring'''







							def __new__(		cls  :				List[str]		,				SCREAMING_SNAKE_CASE_  :				int		):
													_a     =			object.__new__(cls		)
													_a     =			value
													_a     =			member.deprecate
													return member







							@property
							def 		_UpperCAmelCase	(		self  :				Optional[Any]		):
													return ""







							def 		_UpperCAmelCase	(		self  :				int		):
													_a     =			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		,				SCREAMING_SNAKE_CASE_		,				stacklevel=3		,				)






from math import pi


def 							SCREAMING_SNAKE_CASE					(  _UpperCAmelCase				)    ->  float:
						return degree / (180 / pi)


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

		testmod()


