





from typing import TYPE_CHECKING

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


A_        =  {
    "configuration_retribert": ["RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "RetriBertConfig"],
    "tokenization_retribert": ["RetriBertTokenizer"],
}

try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A_        =  ["RetriBertTokenizerFast"]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A_        =  [
						    "RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "RetriBertModel",
						    "RetriBertPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_retribert import RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RetriBertConfig
						from .tokenization_retribert import RetriBertTokenizer

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_retribert_fast import RetriBertTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_retribert import (
												    RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    RetriBertModel,
												    RetriBertPreTrainedModel,
												)

else:
						import sys

						A_        =  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)








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  __UpperCamelCase   (     a = None)			->str:

					def decorator(a):
										global _emitted_deprecation_warnings

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

										lowerCamelCase__      =							(
										    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):
															lowerCamelCase__      =							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)

										lowerCamelCase__      =							"deprecated"

										if inspect.isclass(a):
															lowerCamelCase__      =							wrapper
															return deprecated_class_or_function
										else:
															return wrapper

					return decorator

class SCREAMING_SNAKE_CASE_			(       enum.EnumMeta ):





					"""simple docstring"""


					def __getattribute__(			cls						,	_lowerCAmelCase						):
										lowerCamelCase__      =							super().__getattribute__(_lowerCAmelCase						)
										if isinstance(_lowerCAmelCase						,	enum.Enum						) and obj._on_access:
															obj._on_access()
										return obj





					def __getitem__(			cls						,	_lowerCAmelCase						):
										lowerCamelCase__      =							super().__getitem__(_lowerCAmelCase						)
										if member._on_access:
															member._on_access()
										return member






					def __call__(			cls						,	_lowerCAmelCase						,	_lowerCAmelCase=None						,	*, _lowerCAmelCase=None						,	_lowerCAmelCase=None						,	_lowerCAmelCase=None						,	_lowerCAmelCase=1						):
										lowerCamelCase__      =							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 SCREAMING_SNAKE_CASE_			(       enum.Enum				,							metaclass=lowercase_ ):





					"""simple docstring"""


					def __new__(			cls						,	_lowerCAmelCase						):
										lowerCamelCase__      =							object.__new__(cls						)
										lowerCamelCase__      =							value
										lowerCamelCase__      =							member.deprecate
										return member





					@property
					def        __magic_name__			(			self						):
										return ""






					def        __magic_name__			(			self						):
										lowerCamelCase__      =							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						,	)

