





"""simple docstring"""




from __future__ import annotations






def lowerCamelCase__   (							snake_case_     :  int	,				snake_case_     :  int	)				->    tuple[int, int]:
   if b == 0:
      return (1, 0)
   ((__snake_case)	,     (__snake_case))								=       extended_euclid(snake_case_	,				a % b	)
   __snake_case								=       a // b
   return (y, x - k * y)






def lowerCamelCase__   (							snake_case_     :  int	,				snake_case_     :  int	,				snake_case_     :  int	,				snake_case_     :  int	)				->    int:
   ((__snake_case)	,     (__snake_case))								=       extended_euclid(snake_case_	,				snake_case_	)
   __snake_case								=       na * na
   __snake_case								=       ra * x * na + ra * y * na
   return (n % m + m) % m






def lowerCamelCase__   (							snake_case_     :  int	,				snake_case_     :  int	)				->    int:
   ((__snake_case)	,     (__snake_case))								=       extended_euclid(snake_case_	,				snake_case_	)
   if b < 0:
      __snake_case								=       (b % n + n) % n
   return b






def lowerCamelCase__   (							snake_case_     :  int	,				snake_case_     :  int	,				snake_case_     :  int	,				snake_case_     :  int	)				->    int:
   __snake_case	,     __snake_case								=       invert_modulo(snake_case_	,				snake_case_	), invert_modulo(snake_case_	,				snake_case_	)
   __snake_case								=       na * na
   __snake_case								=       ra * x * na + ra * y * na
   return (n % m + m) % m


if __name__ == "__main__":
    from doctest import testmod

    testmod(name='chinese_remainder_theorem', verbose=True)
    testmod(name='chinese_remainder_theorem2', verbose=True)
    testmod(name='invert_modulo', verbose=True)
    testmod(name='extended_euclid', verbose=True)








from typing import TYPE_CHECKING

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


snake_case_           =      {}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    snake_case_           =      ['NllbTokenizer']

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


if TYPE_CHECKING:
    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_nllb import NllbTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_nllb_fast import NllbTokenizerFast

else:
    import sys

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

