
from typing import TYPE_CHECKING

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


lowerCamelCase_						     =					{
    '''configuration_deberta''': ['''DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DebertaConfig''', '''DebertaOnnxConfig'''],
    '''tokenization_deberta''': ['''DebertaTokenizer'''],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_						     =					['''DebertaTokenizerFast''']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_						     =					[
        '''DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''DebertaForMaskedLM''',
        '''DebertaForQuestionAnswering''',
        '''DebertaForSequenceClassification''',
        '''DebertaForTokenClassification''',
        '''DebertaModel''',
        '''DebertaPreTrainedModel''',
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_						     =					[
        '''TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''TFDebertaForMaskedLM''',
        '''TFDebertaForQuestionAnswering''',
        '''TFDebertaForSequenceClassification''',
        '''TFDebertaForTokenClassification''',
        '''TFDebertaModel''',
        '''TFDebertaPreTrainedModel''',
    ]


if TYPE_CHECKING:
    from .configuration_deberta import DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, DebertaConfig, DebertaOnnxConfig
    from .tokenization_deberta import DebertaTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_deberta_fast import DebertaTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_deberta import (
            DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
            DebertaForMaskedLM,
            DebertaForQuestionAnswering,
            DebertaForSequenceClassification,
            DebertaForTokenClassification,
            DebertaModel,
            DebertaPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_deberta import (
            TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
            TFDebertaForMaskedLM,
            TFDebertaForQuestionAnswering,
            TFDebertaForSequenceClassification,
            TFDebertaForTokenClassification,
            TFDebertaModel,
            TFDebertaPreTrainedModel,
        )


else:
    import sys

    lowerCamelCase_						     =					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)







def 						__magic_name__			(   __a      :	int	,		__a      :	int						):



     '''simple docstring'''




     while a != 0:
          UpperCamelCase__		,	UpperCamelCase__				=    b % a, a
     return b






def 						__magic_name__			(   __a      :	int	,		__a      :	int						):



     '''simple docstring'''




     if gcd(__a	,		__a						) != 1:
          UpperCamelCase__				=    f"mod inverse of {a!r} and {m!r} does not exist"
          raise ValueError(__a						)
     UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__				=    1, 0, a
     UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__				=    0, 1, m
     while va != 0:
          UpperCamelCase__				=    ua // va
          UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__		,	UpperCamelCase__				=    (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
     return ua % m





