






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  ,  )






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


_SCREAMING_SNAKE_CASE     :   Optional[Any]							 =      {
    'configuration_flaubert': ['FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FlaubertConfig', 'FlaubertOnnxConfig'],
    'tokenization_flaubert': ['FlaubertTokenizer'],
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					_SCREAMING_SNAKE_CASE     :   Tuple							 =      [
					    'FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'FlaubertForMultipleChoice',
					    'FlaubertForQuestionAnswering',
					    'FlaubertForQuestionAnsweringSimple',
					    'FlaubertForSequenceClassification',
					    'FlaubertForTokenClassification',
					    'FlaubertModel',
					    'FlaubertWithLMHeadModel',
					    'FlaubertPreTrainedModel',
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					_SCREAMING_SNAKE_CASE     :   Dict							 =      [
					    'TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'TFFlaubertForMultipleChoice',
					    'TFFlaubertForQuestionAnsweringSimple',
					    'TFFlaubertForSequenceClassification',
					    'TFFlaubertForTokenClassification',
					    'TFFlaubertModel',
					    'TFFlaubertPreTrainedModel',
					    'TFFlaubertWithLMHeadModel',
					]


if TYPE_CHECKING:
					from .configuration_flaubert import FLAUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, FlaubertConfig, FlaubertOnnxConfig
					from .tokenization_flaubert import FlaubertTokenizer

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flaubert import (
										    FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FlaubertForMultipleChoice,
										    FlaubertForQuestionAnswering,
										    FlaubertForQuestionAnsweringSimple,
										    FlaubertForSequenceClassification,
										    FlaubertForTokenClassification,
										    FlaubertModel,
										    FlaubertPreTrainedModel,
										    FlaubertWithLMHeadModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_flaubert import (
										    TF_FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFFlaubertForMultipleChoice,
										    TFFlaubertForQuestionAnsweringSimple,
										    TFFlaubertForSequenceClassification,
										    TFFlaubertForTokenClassification,
										    TFFlaubertModel,
										    TFFlaubertPreTrainedModel,
										    TFFlaubertWithLMHeadModel,
										)

else:
					import sys

					_SCREAMING_SNAKE_CASE     :   List[Any]							 =      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)