


'''simple docstring'''






import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch


if is_torch_available():
		import torch

		from transformers.activations import gelu_new, gelu_python, get_activation




@require_torch
class 						a__							(				unittest.TestCase    ):





							'''simple docstring'''






							def     __SCREAMING_SNAKE_CASE				(						self  )			->				Optional[int]:
														lowerCAmelCase__			  =      torch.tensor([-1_00, -1, -0.1, 0, 0.1, 1.0, 1_00]  )
														lowerCAmelCase__			  =      get_activation('''gelu'''  )
														self.assertTrue(torch.allclose(gelu_python(lowerCamelCase_  )   ,       torch_builtin(lowerCamelCase_  )  )  )
														self.assertFalse(torch.allclose(gelu_python(lowerCamelCase_  )   ,       gelu_new(lowerCamelCase_  )  )  )







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				Optional[int]:
														lowerCAmelCase__			  =      torch.tensor([-1_00, -1, -0.1, 0, 0.1, 1.0, 1_00]  )
														lowerCAmelCase__			  =      get_activation('''gelu'''  )
														lowerCAmelCase__			  =      get_activation('''gelu_10'''  )

														lowerCAmelCase__			  =      torch_builtin(lowerCamelCase_  )
														lowerCAmelCase__			  =      geluaa(lowerCamelCase_  )

														lowerCAmelCase__			  =      torch.where(y_gelu_aa < 10.0   ,       1   ,       0  )

														self.assertTrue(torch.max(lowerCamelCase_  ).item() == 10.0  )
														self.assertTrue(torch.allclose(y_gelu * clipped_mask   ,       y_gelu_aa * clipped_mask  )  )







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				str:
														get_activation('''gelu'''  )
														get_activation('''gelu_10'''  )
														get_activation('''gelu_fast'''  )
														get_activation('''gelu_new'''  )
														get_activation('''gelu_python'''  )
														get_activation('''gelu_pytorch_tanh'''  )
														get_activation('''linear'''  )
														get_activation('''mish'''  )
														get_activation('''quick_gelu'''  )
														get_activation('''relu'''  )
														get_activation('''sigmoid'''  )
														get_activation('''silu'''  )
														get_activation('''swish'''  )
														get_activation('''tanh'''  )
														with self.assertRaises(lowerCamelCase_  ):
																					get_activation('''bogus'''  )
														with self.assertRaises(lowerCamelCase_  ):
																					get_activation(lowerCamelCase_  )







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				List[Any]:
														lowerCAmelCase__			  =      get_activation('''gelu'''  )
														lowerCAmelCase__			  =      1
														lowerCAmelCase__			  =      get_activation('''gelu'''  )
														self.assertEqual(acta.a   ,       1  )
														with self.assertRaises(lowerCamelCase_  ):
																					lowerCAmelCase__			  =      acta.a



'''simple docstring'''






def    _snake_case  (	A					,       A			)		->       int:
							return x if y == 0 else greatest_common_divisor(A					,       x % y			)


def    _snake_case  (	A					,       A			)		->       int:
							return (x * y) // greatest_common_divisor(A					,       A			)


def    _snake_case  (	A = 20			)		->       int:
							lowerCAmelCase__			  =      1
							for i in range(1					,       n + 1			):
														lowerCAmelCase__			  =      lcm(A					,       A			)
							return g


if __name__ == "__main__":
		print(f"""{solution() = }""")