
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


_lowerCamelCase			:							Tuple         =     {'''configuration_reformer''': ['''REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ReformerConfig''']}

try:
			if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_lowerCamelCase			:							Union[str, Any]         =     ['''ReformerTokenizer''']

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_lowerCamelCase			:							Any         =     ['''ReformerTokenizerFast''']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_lowerCamelCase			:							str         =     [
			    '''REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''ReformerAttention''',
			    '''ReformerForMaskedLM''',
			    '''ReformerForQuestionAnswering''',
			    '''ReformerForSequenceClassification''',
			    '''ReformerLayer''',
			    '''ReformerModel''',
			    '''ReformerModelWithLMHead''',
			    '''ReformerPreTrainedModel''',
			]


if TYPE_CHECKING:
			from .configuration_reformer import REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, ReformerConfig

			try:
						if not is_sentencepiece_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_reformer import ReformerTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_reformer_fast import ReformerTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_reformer import (
						    REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
						    ReformerAttention,
						    ReformerForMaskedLM,
						    ReformerForQuestionAnswering,
						    ReformerForSequenceClassification,
						    ReformerLayer,
						    ReformerModel,
						    ReformerModelWithLMHead,
						    ReformerPreTrainedModel,
						)

else:
			import sys

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







'''simple docstring'''



from ..utils import DummyObject, requires_backends
class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Dict  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Any  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	Any:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		str		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		List[Any]		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		List[Any]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Any  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Any:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Tuple  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		int		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		int  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Dict		)	->	Optional[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		List[str]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	str:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		Optional[Any]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		Dict		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		int  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Tuple		)	->	Union[str, Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Any  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Optional[Any]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		List[str]  ,   **UpperCAmelCase      :		List[str]		)	->	Optional[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		Any		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[Any]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		Any		)	->	Any:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		List[str]  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		int		)	->	Tuple:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		Dict		)	->	int:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		List[str]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Dict		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		str		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[int]		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Tuple  ,   **UpperCAmelCase      :		Any		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[Any]  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		int		)	->	Tuple:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Optional[int]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	Union[str, Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)



