






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

from .logging import get_logger


a    =       set()
a    =       get_logger(__name__)
def       a__						(  A = None					):

   def decorator(A					):
      global _emitted_deprecation_warnings

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

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

      @wraps(A					)
      def wrapper(*A		,				**A					):
         lowercase__						:	Optional[int]         = hash(A					)
         if func_hash not in _emitted_deprecation_warnings:
            warnings.warn(A		,				category=A		,				stacklevel=2					)
            _emitted_deprecation_warnings.add(A					)
         return deprecated_function(*A		,				**A					)

      lowercase__						:	List[Any]         = '''deprecated'''

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

   return decorator
class        __snake_case(					enum.EnumMeta      ):



 def __getattribute__(	cls   :   Optional[Any] ,		UpperCAmelCase__   :   Optional[int]	):

    """simple docstring"""






    lowercase__						:	Optional[Any]         = super().__getattribute__(_snake_case	)
    if isinstance(_snake_case ,		enum.Enum	) and obj._on_access:
       obj._on_access()
    return obj



 def __getitem__(	cls   :   str ,		UpperCAmelCase__   :   Tuple	):

    """simple docstring"""






    lowercase__						:	Union[str, Any]         = super().__getitem__(_snake_case	)
    if member._on_access:
       member._on_access()
    return member







 def __call__(	cls   :   int ,		UpperCAmelCase__   :   Optional[Any] ,		UpperCAmelCase__   :   Optional[int]=None ,		*, UpperCAmelCase__   :   Union[str, Any]=None ,		UpperCAmelCase__   :   List[str]=None ,		UpperCAmelCase__   :   Dict=None ,		UpperCAmelCase__   :   List[Any]=1	):

    """simple docstring"""






    lowercase__						:	Tuple         = super().__call__(_snake_case ,		_snake_case ,		module=_snake_case ,		qualname=_snake_case ,		type=_snake_case ,		start=_snake_case	)
    if isinstance(_snake_case ,		enum.Enum	) and obj._on_access:
       obj._on_access()
    return obj
class        __snake_case(					enum.Enum     ,       metaclass=a_      ):



 def __new__(	cls   :   int ,		UpperCAmelCase__   :   Dict	):

    """simple docstring"""






    lowercase__						:	Tuple         = object.__new__(cls	)
    lowercase__						:	Any         = value
    lowercase__						:	str         = member.deprecate
    return member



 @property
 def 						UpperCAmelCase    (	self   :   Optional[Any]	):

    """simple docstring"""






    return ""







 def 						UpperCAmelCase    (	self   :   int	):

    """simple docstring"""






    lowercase__						:	int         = 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 ,		_snake_case ,		stacklevel=3 ,		)










from __future__ import annotations

from collections.abc import Iterator
from typing import Any
class        __snake_case:



 def __init__(	self   :   Union[str, Any] ,		UpperCAmelCase__   :   Any	):

    """simple docstring"""






    lowercase__						:	Any         = data
    lowercase__						:	Node | None         = None







 def __str__(	self   :   Dict	):

    """simple docstring"""






    return f'''{self.data}'''
class        __snake_case:



 def __init__(	self   :   Optional[Any]	):

    """simple docstring"""






    lowercase__						:	Node | None         = None
    lowercase__						:	Node | None         = None



 def __iter__(	self   :   Any	):

    """simple docstring"""






    lowercase__						:	Any         = self.front
    while node:
       yield node.data
       lowercase__						:	List[str]         = node.next



 def __len__(	self   :   Union[str, Any]	):

    """simple docstring"""






    return len(tuple(iter(self	)	)	)



 def __str__(	self   :   Optional[Any]	):

    """simple docstring"""






    return " <- ".join(str(UpperCAmelCase__	) for item in self	)



 def 						UpperCAmelCase    (	self   :   List[str]	):

    """simple docstring"""






    return len(self	) == 0



 def 						UpperCAmelCase    (	self   :   Optional[int] ,		UpperCAmelCase__   :   Any	):

    """simple docstring"""






    lowercase__						:	List[str]         = Node(UpperCAmelCase__	)
    if self.is_empty():
       lowercase__						:	List[Any]         = node
    else:
       assert isinstance(self.rear ,		UpperCAmelCase__	)
       lowercase__						:	Any         = node
       lowercase__						:	Union[str, Any]         = node



 def 						UpperCAmelCase    (	self   :   List[Any]	):

    """simple docstring"""






    if self.is_empty():
       raise IndexError("""dequeue from empty queue"""	)
    assert isinstance(self.front ,		UpperCAmelCase__	)
    lowercase__						:	Tuple         = self.front
    lowercase__						:	Any         = self.front.next
    if self.front is None:
       lowercase__						:	List[Any]         = None
    return node.data







 def 						UpperCAmelCase    (	self   :   Optional[Any]	):

    """simple docstring"""






    lowercase__						:	List[Any]         = None


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

 testmod()


