


"""simple docstring"""






import unittest
from timeit import timeit




def        A_					(					UpperCAmelCase__       ,   UpperCAmelCase__				)     ->     int:
   a   :	Tuple						=    first_num if first_num >= second_num else second_num
   a   :	Optional[int]						=    max_num
   while (common_mult % first_num > 0) or (common_mult % second_num > 0):
      common_mult += max_num
   return common_mult




def        A_					(					UpperCAmelCase__       ,   UpperCAmelCase__				)     ->     int:
   return b if a == 0 else greatest_common_divisor(b % a       ,   UpperCAmelCase__				)




def        A_					(					UpperCAmelCase__       ,   UpperCAmelCase__				)     ->     int:
   return first_num // greatest_common_divisor(UpperCAmelCase__       ,   UpperCAmelCase__				) * second_num




def        A_					(					)     ->     Union[str, Any]:
   a   :	Tuple						=    (
       'from __main__ import least_common_multiple_slow, least_common_multiple_fast'
   )
   print(
       'least_common_multiple_slow():'       ,   timeit('least_common_multiple_slow(1000, 999)'       ,   setup=UpperCAmelCase__				)       ,   )
   print(
       'least_common_multiple_fast():'       ,   timeit('least_common_multiple_fast(1000, 999)'       ,   setup=UpperCAmelCase__				)       ,   )


class 	A_       (     unittest.TestCase   ):





  """simple docstring"""

  lowercase		:	int   =						(
      (10, 20),
      (13, 15),
      (4, 31),
      (10, 42),
      (43, 34),
      (5, 12),
      (12, 25),
      (10, 25),
      (6, 9),
  )
  lowercase		:	List[str]   =						(20, 1_95, 1_24, 2_10, 14_62, 60, 3_00, 50, 18)
  def 							lowercase_     (						self						)				->					Union[str, Any]:
     for i, (first_num, second_num) in enumerate(self.test_inputs						):
        a   :	str						=    least_common_multiple_slow(__UpperCAmelCase  ,					__UpperCAmelCase						)
        a   :	Optional[Any]						=    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()









"""simple docstring"""






import unittest

from transformers import BlenderbotTokenizer, BlenderbotTokenizerFast
from transformers.utils import cached_property


class 	A_       (     unittest.TestCase   ):





  """simple docstring"""

  @cached_property
  def 							lowercase_     (						self						)				->					Optional[Any]:
     return BlenderbotTokenizer.from_pretrained('facebook/blenderbot-3B'						)
  @cached_property
  def 							lowercase_     (						self						)				->					Optional[int]:
     return BlenderbotTokenizerFast.from_pretrained('facebook/blenderbot-3B'						)
  def 							lowercase_     (						self						)				->					Union[str, Any]:
     a   :	List[Any]						=    self.tokenizer_ab
     a   :	int						=    ' I am a small frog.'
     a   :	Any						=    tok([src_text]  ,					padding=__UpperCAmelCase  ,					truncation=__UpperCAmelCase						)['input_ids']
     a   :	List[str]						=    tok.batch_decode(__UpperCAmelCase  ,					skip_special_tokens=__UpperCAmelCase  ,					clean_up_tokenization_spaces=__UpperCAmelCase						)[0]
     assert src_text == decoded
  def 							lowercase_     (						self						)				->					Optional[Any]:
     a   :	Optional[int]						=    self.rust_tokenizer_ab
     a   :	List[Any]						=    ' I am a small frog.'
     a   :	Union[str, Any]						=    tok([src_text]  ,					padding=__UpperCAmelCase  ,					truncation=__UpperCAmelCase						)['input_ids']
     a   :	Optional[Any]						=    tok.batch_decode(__UpperCAmelCase  ,					skip_special_tokens=__UpperCAmelCase  ,					clean_up_tokenization_spaces=__UpperCAmelCase						)[0]
     assert src_text == decoded
  def 							lowercase_     (						self						)				->					Tuple:
     assert self.tokenizer_ab.add_prefix_space
     assert self.tokenizer_ab([' Sam', 'Sam']						).input_ids == [[55_02, 2], [55_02, 2]]






  def 							lowercase_     (						self						)				->					Tuple:
     assert self.rust_tokenizer_ab.add_prefix_space
     assert self.rust_tokenizer_ab([' Sam', 'Sam']						).input_ids == [[55_02, 2], [55_02, 2]]





