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

from .logging import get_logger


UpperCAmelCase__				:  Any       					=				set()
UpperCAmelCase__				:  List[Any]       					=				get_logger(__name__)



def       _lowercase					(      __SCREAMING_SNAKE_CASE = None )	->     Tuple:

			def decorator(__SCREAMING_SNAKE_CASE ):
						global _emitted_deprecation_warnings

						if inspect.isclass(__SCREAMING_SNAKE_CASE ):
									UpperCamelCase__    :		List[str]     =				deprecated_class_or_function.__init__
									UpperCamelCase__    :		List[Any]     =				deprecated_class_or_function.__name__
						else:
									UpperCamelCase__    :		Union[str, Any]     =				deprecated_class_or_function
									UpperCamelCase__    :		Optional[int]     =				deprecated_function.__name__
									# Support deprecating __init__ class method: class name instead
									UpperCamelCase__    :		List[str]     =				name if name != '__init__' else deprecated_function.__qualname__.split('.' )[-2]

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

						@wraps(__SCREAMING_SNAKE_CASE )
						def wrapper(*__SCREAMING_SNAKE_CASE				,    **__SCREAMING_SNAKE_CASE ):
									UpperCamelCase__    :		List[str]     =				hash(__SCREAMING_SNAKE_CASE )
									if func_hash not in _emitted_deprecation_warnings:
												warnings.warn(__SCREAMING_SNAKE_CASE				,    category=__SCREAMING_SNAKE_CASE				,    stacklevel=2 )
												_emitted_deprecation_warnings.add(__SCREAMING_SNAKE_CASE )
									return deprecated_function(*__SCREAMING_SNAKE_CASE				,    **__SCREAMING_SNAKE_CASE )

						UpperCamelCase__    :		Optional[Any]     =				'deprecated'

						if inspect.isclass(__SCREAMING_SNAKE_CASE ):
									UpperCamelCase__    :		List[str]     =				wrapper
									return deprecated_class_or_function
						else:
									return wrapper

			return decorator



class 			UpperCamelCase_			(						enum.EnumMeta   ):




							'''simple docstring'''

							def __getattribute__(				cls     ,						UpperCamelCase) ->	Tuple:
										UpperCamelCase__    :		List[str]     =				super().__getattribute__(UpperCamelCase)
										if isinstance(UpperCamelCase     ,						enum.Enum) and obj._on_access:
													obj._on_access()
										return obj
							def __getitem__(				cls     ,						UpperCamelCase) ->	List[Any]:
										UpperCamelCase__    :		int     =				super().__getitem__(UpperCamelCase)
										if member._on_access:
													member._on_access()
										return member






							def __call__(				cls     ,						UpperCamelCase     ,						UpperCamelCase=None     ,						*, UpperCamelCase=None     ,						UpperCamelCase=None     ,						UpperCamelCase=None     ,						UpperCamelCase=1) ->	Optional[int]:
										UpperCamelCase__    :		Optional[Any]     =				super().__call__(UpperCamelCase     ,						UpperCamelCase     ,						module=UpperCamelCase     ,						qualname=UpperCamelCase     ,						type=UpperCamelCase     ,						start=UpperCamelCase)
										if isinstance(UpperCamelCase     ,						enum.Enum) and obj._on_access:
													obj._on_access()
										return obj



class 			UpperCamelCase_			(						enum.Enum	,     metaclass=__UpperCamelCase   ):




							'''simple docstring'''

							def __new__(				cls     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		Optional[int]     =				object.__new__(cls)
										UpperCamelCase__    :		Tuple     =				value
										UpperCamelCase__    :		Union[str, Any]     =				member.deprecate
										return member
							@property
							def        lowerCAmelCase__ (				self) ->	Optional[Any]:
										return ""






							def        lowerCAmelCase__ (				self) ->	Tuple:
										UpperCamelCase__    :		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     ,						UpperCamelCase     ,						stacklevel=3     ,						)





import numpy as np

UpperCAmelCase__				:  str       					=				[
    ['''a''', '''b''', '''c''', '''d''', '''e'''],
    ['''f''', '''g''', '''h''', '''i''', '''k'''],
    ['''l''', '''m''', '''n''', '''o''', '''p'''],
    ['''q''', '''r''', '''s''', '''t''', '''u'''],
    ['''v''', '''w''', '''x''', '''y''', '''z'''],
]



class 			UpperCamelCase_			:




							'''simple docstring'''

							def __init__(				self) ->	None:
										UpperCamelCase__    :		Any     =				np.array(UpperCamelCase)
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	np.ndarray:
										UpperCamelCase__   ,			UpperCamelCase__    :		Optional[int]     =				np.where(letter == self.SQUARE)
										UpperCamelCase__    :		int     =				np.concatenate([indexa + 1, indexa + 1])
										return indexes
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase     ,						UpperCamelCase) ->	str:
										return self.SQUARE[indexa - 1, indexa - 1]
							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		str     =				message.lower()
										UpperCamelCase__    :		int     =				message.replace('j'     ,						'i')

										UpperCamelCase__    :		List[Any]     =				''
										for letter_index in range(len(UpperCamelCase)):
													if message[letter_index] != " ":
																UpperCamelCase__    :		Union[str, Any]     =				self.letter_to_numbers(message[letter_index])
																UpperCamelCase__    :		int     =				encoded_message + str(numbers[0]) + str(numbers[1])
													elif message[letter_index] == " ":
																UpperCamelCase__    :		str     =				encoded_message + ' '

										return encoded_message






							def        lowerCAmelCase__ (				self     ,						UpperCamelCase) ->	str:
										UpperCamelCase__    :		Union[str, Any]     =				message.replace(' '     ,						'  ')
										UpperCamelCase__    :		int     =				''
										for numbers_index in range(int(len(UpperCamelCase) / 2)):
													if message[numbers_index * 2] != " ":
																UpperCamelCase__    :		List[str]     =				message[numbers_index * 2]
																UpperCamelCase__    :		Tuple     =				message[numbers_index * 2 + 1]

																UpperCamelCase__    :		Tuple     =				self.numbers_to_letter(int(UpperCamelCase)     ,						int(UpperCamelCase))
																UpperCamelCase__    :		List[str]     =				decoded_message + letter
													elif message[numbers_index * 2] == " ":
																UpperCamelCase__    :		str     =				decoded_message + ' '

										return decoded_message



