





from typing import TYPE_CHECKING

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


snake_case__									=  {
    'configuration_dpr': ['DPR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DPRConfig'],
    'tokenization_dpr': [
        'DPRContextEncoderTokenizer',
        'DPRQuestionEncoderTokenizer',
        'DPRReaderOutput',
        'DPRReaderTokenizer',
    ],
}


try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case__									=  [
           'DPRContextEncoderTokenizerFast',
           'DPRQuestionEncoderTokenizerFast',
           'DPRReaderTokenizerFast',
       ]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case__									=  [
           'DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'DPRContextEncoder',
           'DPRPretrainedContextEncoder',
           'DPRPreTrainedModel',
           'DPRPretrainedQuestionEncoder',
           'DPRPretrainedReader',
           'DPRQuestionEncoder',
           'DPRReader',
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case__									=  [
           'TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST',
           'TFDPRContextEncoder',
           'TFDPRPretrainedContextEncoder',
           'TFDPRPretrainedQuestionEncoder',
           'TFDPRPretrainedReader',
           'TFDPRQuestionEncoder',
           'TFDPRReader',
       ]


if TYPE_CHECKING:
       from .configuration_dpr import DPR_PRETRAINED_CONFIG_ARCHIVE_MAP, DPRConfig
       from .tokenization_dpr import (
           DPRContextEncoderTokenizer,
           DPRQuestionEncoderTokenizer,
           DPRReaderOutput,
           DPRReaderTokenizer,
       )

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_dpr_fast import (
                  DPRContextEncoderTokenizerFast,
                  DPRQuestionEncoderTokenizerFast,
                  DPRReaderTokenizerFast,
              )

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_dpr import (
                  DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  DPRContextEncoder,
                  DPRPretrainedContextEncoder,
                  DPRPreTrainedModel,
                  DPRPretrainedQuestionEncoder,
                  DPRPretrainedReader,
                  DPRQuestionEncoder,
                  DPRReader,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_dpr import (
                  TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFDPRContextEncoder,
                  TFDPRPretrainedContextEncoder,
                  TFDPRPretrainedQuestionEncoder,
                  TFDPRPretrainedReader,
                  TFDPRQuestionEncoder,
                  TFDPRReader,
              )

else:
       import sys

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












import unittest
from timeit import timeit



def _a       (			lowerCamelCase:     int      ,       lowerCamelCase:     int				)			->		int:







      '''simple docstring'''






      __A      =       first_num if first_num >= second_num else second_num
      __A      =       max_num
      while (common_mult % first_num > 0) or (common_mult % second_num > 0):
            common_mult += max_num
      return common_mult



def _a       (			lowerCamelCase:     int      ,       lowerCamelCase:     int				)			->		int:







      '''simple docstring'''






      return b if a == 0 else greatest_common_divisor(b % a      ,       lowerCamelCase				)



def _a       (			lowerCamelCase:     int      ,       lowerCamelCase:     int				)			->		int:







      '''simple docstring'''






      return first_num // greatest_common_divisor(lowerCamelCase      ,       lowerCamelCase				) * second_num



def _a       (			)			->		Tuple:







      '''simple docstring'''






      __A      =       (
          '''from __main__ import least_common_multiple_slow, least_common_multiple_fast'''
      )
      print(
          '''least_common_multiple_slow():'''      ,       timeit('''least_common_multiple_slow(1000, 999)'''      ,       setup=lowerCamelCase				)      ,       )
      print(
          '''least_common_multiple_fast():'''      ,       timeit('''least_common_multiple_fast(1000, 999)'''      ,       setup=lowerCamelCase				)      ,       )





class A_      (    unittest.TestCase     ):
   lowerCAmelCase__       =				(
       (10, 20),
       (13, 15),
       (4, 31),
       (10, 42),
       (43, 34),
       (5, 12),
       (12, 25),
       (10, 25),
       (6, 9),
   )
   lowerCAmelCase__       =				(20, 195, 124, 210, 1462, 60, 300, 50, 18)




   def _lowerCAmelCase   (self			:List[str]				)->      Union[str, Any]:
         for i, (first_num, second_num) in enumerate(self.test_inputs				):
               __A      =       least_common_multiple_slow(_UpperCamelCase					,     _UpperCamelCase				)
               __A      =       least_common_multiple_fast(_UpperCamelCase					,     _UpperCamelCase				)
               with self.subTest(i=_UpperCamelCase				):
                     self.assertEqual(_UpperCamelCase					,     self.expected_results[i]				)
                     self.assertEqual(_UpperCamelCase					,     self.expected_results[i]				)


if __name__ == "__main__":
       benchmark()
       unittest.main()





