import unittest
from timeit import timeit






def  __lowerCamelCase						(		lowerCAmelCase__      ,    lowerCAmelCase__      ):
       lowerCAmelCase__	      =   first_num if first_num >= second_num else second_num
       lowerCAmelCase__	      =   max_num
       while (common_mult % first_num > 0) or (common_mult % second_num > 0):
              common_mult += max_num
       return common_mult






def  __lowerCamelCase						(		lowerCAmelCase__      ,    lowerCAmelCase__      ):
       return b if a == 0 else greatest_common_divisor(b % a      ,    _A      )






def  __lowerCamelCase						(		lowerCAmelCase__      ,    lowerCAmelCase__      ):
       return first_num // greatest_common_divisor(_A      ,    _A      ) * second_num






def  __lowerCamelCase						(		):
       lowerCAmelCase__	      =   (
           'from __main__ import least_common_multiple_slow, least_common_multiple_fast'
       )
       print(
           'least_common_multiple_slow():'      ,    timeit('least_common_multiple_slow(1000, 999)'      ,    setup=_A      )      ,    )
       print(
           'least_common_multiple_fast():'      ,    timeit('least_common_multiple_fast(1000, 999)'      ,    setup=_A      )      ,    )
class 							a_					(		unittest.TestCase		):






 '''simple docstring'''






 UpperCAmelCase_      					=   (
     (10, 20),
     (13, 15),
     (4, 31),
     (10, 42),
     (43, 34),
     (5, 12),
     (12, 25),
     (10, 25),
     (6, 9),
 )
 UpperCAmelCase_      					=   (20, 195, 124, 210, 1_462, 60, 300, 50, 18)




 def 						__snake_case		(     self   :    Any):







        '''simple docstring'''



        for i, (first_num, second_num) in enumerate(self.test_inputs):
               lowerCAmelCase__	      =   least_common_multiple_slow(snake_case__     ,       snake_case__)
               lowerCAmelCase__	      =   least_common_multiple_fast(snake_case__     ,       snake_case__)
               with self.subTest(i=snake_case__):
                      self.assertEqual(snake_case__     ,       self.expected_results[i])
                      self.assertEqual(snake_case__     ,       self.expected_results[i])


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




'''simple docstring'''




import importlib.metadata
import sys

from transformers.testing_utils import TestCasePlus
from transformers.utils.versions import require_version, require_version_core


_lowerCAmelCase	:		Optional[int]		  =						importlib.metadata.version('numpy')
_lowerCAmelCase	:		List[Any]		  =						'.'.join([str(x) for x in sys.version_info[:3]])



class 			lowerCAmelCase					(					a				):



	def 					lowercase  (       self     ):
		# lt + different version strings
		require_version_core('numpy<1000.4.5'     )
		require_version_core('numpy<1000.4'     )
		require_version_core('numpy<1000'     )

		# le
		require_version_core('numpy<=1000.4.5'     )
		require_version_core(f"numpy<={numpy_ver}"     )

		# eq
		require_version_core(f"numpy=={numpy_ver}"     )

		# ne
		require_version_core('numpy!=1000.4.5'     )

		# ge
		require_version_core('numpy>=1.0'     )
		require_version_core('numpy>=1.0.0'     )
		require_version_core(f"numpy>={numpy_ver}"     )

		# gt
		require_version_core('numpy>1.0.0'     )

		# mix
		require_version_core('numpy>1.0.0,<1000'     )

		# requirement w/o version
		require_version_core('numpy'     )

		# unmet requirements due to version conflict
		for req in ["numpy==1.0.0", "numpy>=1000.0.0", f"numpy<{numpy_ver}"]:
			try:
				require_version_core(snake_case__     )
			except ImportError as e:
				self.assertIn(f"{req} is required"			,       str(snake_case__     )     )
				self.assertIn('but found'			,       str(snake_case__     )     )

        # unmet requirements due to missing module
		for req in ["numpipypie>1", "numpipypie2"]:
			try:
				require_version_core(snake_case__     )
			except importlib.metadata.PackageNotFoundError as e:
				self.assertIn(f"The '{req}' distribution was not found and is required by this application"			,       str(snake_case__     )     )
				self.assertIn('Try: pip install transformers -U'			,       str(snake_case__     )     )

        # bogus requirements formats:
        # 1. whole thing
		for req in ["numpy??1.0.0", "numpy1.0.0"]:
			try:
				require_version_core(snake_case__     )
			except ValueError as e:
				self.assertIn('requirement needs to be in the pip package format'			,       str(snake_case__     )     )
        # 2. only operators
		for req in ["numpy=1.0.0", "numpy == 1.00", "numpy<>1.0.0", "numpy><1.00", "numpy>>1.0.0"]:
			try:
				require_version_core(snake_case__     )
			except ValueError as e:
				self.assertIn('need one of '			,       str(snake_case__     )     )



	def 					lowercase  (       self     ):
		# matching requirement
		require_version('python>=3.6.0'     )

		# not matching requirements
		for req in ["python>9.9.9", "python<3.0.0"]:
			try:
				require_version_core(snake_case__     )
			except ImportError as e:
				self.assertIn(f"{req} is required"			,       str(snake_case__     )     )
				self.assertIn(f"but found python=={python_ver}"			,       str(snake_case__     )     )
