





def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  str:





    while a != 0:
        lowerCamelCase__				,							lowerCamelCase__					:   List[str]      				=	b % a, a
    return b


def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase		,			_UpperCAmelCase				)    ->  Union[str, Any]:





    if gcd(A_		,			A_				) != 1:
        lowerCamelCase__					:   Union[str, Any]      				=	F"""mod inverse of {a!r} and {m!r} does not exist"""
        raise ValueError(A_				)
    lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__					:   Optional[Any]      				=	1, 0, a
    lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__					:   int      				=	0, 1, m
    while va != 0:
        lowerCamelCase__					:   int      				=	ua // va
        lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__				,							lowerCamelCase__					:   str      				=	(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
    return ua % m












from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase       : List[str]			     =       {
    """configuration_autoformer""": [
        """AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AutoformerConfig""",
    ],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _UpperCAmelCase       : List[Any]			     =       [
        """AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """AutoformerForPrediction""",
        """AutoformerModel""",
        """AutoformerPreTrainedModel""",
    ]


if TYPE_CHECKING:
    from .configuration_autoformer import (
        AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
        AutoformerConfig,
    )

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_autoformer import (
            AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            AutoformerForPrediction,
            AutoformerModel,
            AutoformerPreTrainedModel,
        )

else:
    import sys

    _UpperCAmelCase       : Dict			     =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





