




import unittest

from diffusers import __version__
from diffusers.utils import deprecate




class       UpperCAmelCase_   ( unittest.TestCase							):




							'''simple docstring'''



							a__    	=  '''.'''.join([str(int(__version__.split('''.'''							)[0]							) + 1							)] + __version__.split('''.'''							)[1:]							)
							a__    	=  '''0.0.1'''





							def  _UpperCAmelCase  (       self							:						Optional[int]      )      ->       List[str]:
										SCREAMING_SNAKE_CASE     =       {"""deprecated_arg""": 4}

										with self.assertWarns(a      ) as warning:
													SCREAMING_SNAKE_CASE     =       deprecate("""deprecated_arg"""							,  self.higher_version							,  """message"""							,  take_from=a      )

										assert output == 4
										assert (
										    str(warning.warning      )
										    == f"""The `deprecated_arg` argument is deprecated and will be removed in version {self.higher_version}."""
										    " message"
										)





							def  _UpperCAmelCase  (       self							:						List[Any]      )      ->       Dict:
										SCREAMING_SNAKE_CASE     =       {"""deprecated_arg""": 4}

										with self.assertWarns(a      ) as warning:
													SCREAMING_SNAKE_CASE     =       deprecate(("""deprecated_arg""", self.higher_version, """message""")							,  take_from=a      )

										assert output == 4
										assert (
										    str(warning.warning      )
										    == f"""The `deprecated_arg` argument is deprecated and will be removed in version {self.higher_version}."""
										    " message"
										)





							def  _UpperCAmelCase  (       self							:						Union[str, Any]      )      ->       Optional[Any]:
										SCREAMING_SNAKE_CASE     =       {"""deprecated_arg_1""": 4, """deprecated_arg_2""": 8}
										with self.assertWarns(a      ) as warning:
													SCREAMING_SNAKE_CASE  ,	SCREAMING_SNAKE_CASE     =       deprecate(
													    ("""deprecated_arg_1""", self.higher_version, """Hey""")							,  ("""deprecated_arg_2""", self.higher_version, """Hey""")							,  take_from=a							,  )
										assert output_a == 4
										assert output_a == 8
										assert (
										    str(warning.warnings[0].message      )
										    == "The `deprecated_arg_1` argument is deprecated and will be removed in version"
										    f""" {self.higher_version}. Hey"""
										)
										assert (
										    str(warning.warnings[1].message      )
										    == "The `deprecated_arg_2` argument is deprecated and will be removed in version"
										    f""" {self.higher_version}. Hey"""
										)





							def  _UpperCAmelCase  (       self							:						Tuple      )      ->       int:
										SCREAMING_SNAKE_CASE     =       {"""deprecated_arg""": 4}

										with self.assertRaises(a      ) as error:
													deprecate(("""wrong_arg""", self.higher_version, """message""")							,  take_from=a      )

										assert "test_deprecate_function_incorrect_arg in" in str(error.exception      )
										assert "line" in str(error.exception      )
										assert "got an unexpected keyword argument `deprecated_arg`" in str(error.exception      )





							def  _UpperCAmelCase  (       self							:						Optional[int]      )      ->       str:
										with self.assertWarns(a      ) as warning:
													deprecate(("""deprecated_arg""", self.higher_version, """message""")      )

										assert (
										    str(warning.warning      )
										    == f"""`deprecated_arg` is deprecated and will be removed in version {self.higher_version}. message"""
										)





							def  _UpperCAmelCase  (       self							:						List[Any]      )      ->       Optional[Any]:
										with self.assertWarns(a      ) as warning:
													deprecate(
													    ("""deprecated_arg_1""", self.higher_version, """Hey""")							,  ("""deprecated_arg_2""", self.higher_version, """Hey""")							,  )
										assert (
										    str(warning.warnings[0].message      )
										    == f"""`deprecated_arg_1` is deprecated and will be removed in version {self.higher_version}. Hey"""
										)
										assert (
										    str(warning.warnings[1].message      )
										    == f"""`deprecated_arg_2` is deprecated and will be removed in version {self.higher_version}. Hey"""
										)





							def  _UpperCAmelCase  (       self							:						Optional[Any]      )      ->       Tuple:




										class       UpperCAmelCase_   :




																	'''simple docstring'''



																	a__    	=  5

										with self.assertWarns(a      ) as warning:
													SCREAMING_SNAKE_CASE     =       deprecate(("""arg""", self.higher_version, """message""")							,  take_from=Args()      )

										assert arg == 5
										assert (
										    str(warning.warning      )
										    == f"""The `arg` attribute is deprecated and will be removed in version {self.higher_version}. message"""
										)





							def  _UpperCAmelCase  (       self							:						Dict      )      ->       str:




										class       UpperCAmelCase_   :




																	'''simple docstring'''



																	a__    	=  5
																	a__    	=  7

										with self.assertWarns(a      ) as warning:
													SCREAMING_SNAKE_CASE  ,	SCREAMING_SNAKE_CASE     =       deprecate(
													    ("""arg""", self.higher_version, """message""")							,  ("""foo""", self.higher_version, """message""")							,  ("""does not exist""", self.higher_version, """message""")							,  take_from=Args()							,  )

										assert arg_a == 5
										assert arg_a == 7
										assert (
										    str(warning.warning      )
										    == f"""The `arg` attribute is deprecated and will be removed in version {self.higher_version}. message"""
										)
										assert (
										    str(warning.warnings[0].message      )
										    == f"""The `arg` attribute is deprecated and will be removed in version {self.higher_version}. message"""
										)
										assert (
										    str(warning.warnings[1].message      )
										    == f"""The `foo` attribute is deprecated and will be removed in version {self.higher_version}. message"""
										)





							def  _UpperCAmelCase  (       self							:						Dict      )      ->       Optional[Any]:
										SCREAMING_SNAKE_CASE     =       {"""deprecated_arg""": 4}

										with self.assertRaises(a      ) as error:
													deprecate(("""wrong_arg""", self.lower_version, """message""")							,  take_from=a      )

										assert (
										    str(error.exception      )
										    == "The deprecation tuple ('wrong_arg', '0.0.1', 'message') should be removed since diffusers' version"
										    f""" {__version__} is >= {self.lower_version}"""
										)





							def  _UpperCAmelCase  (       self							:						Any      )      ->       Tuple:
										with self.assertWarns(a      ) as warning:
													deprecate(("""deprecated_arg""", self.higher_version, """This message is better!!!""")							,  standard_warn=a      )

										assert str(warning.warning      ) == "This message is better!!!"







							def  _UpperCAmelCase  (       self							:						Dict      )      ->       List[Any]:
										with self.assertWarns(a      ) as warning:
													deprecate(("""deprecated_arg""", self.higher_version, """This message is better!!!""")							,  standard_warn=a      )
										assert str(warning.warning      ) == "This message is better!!!"
										assert "diffusers/tests/others/test_utils.py" in warning.filename












def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			if n == 0:
						return 1

			elif n % 2 == 1:
						return binary_exponentiation(SCREAMING_SNAKE_CASE       ,						n - 1 ) * a

			else:
						SCREAMING_SNAKE_CASE     =       binary_exponentiation(SCREAMING_SNAKE_CASE       ,						n / 2 )
						return b * b


if __name__ == "__main__":
		try:
				__A    :				Tuple    						=	int(input("""Enter Base : """).strip())
				__A    :				Any    						=	int(input("""Enter Power : """).strip())
		except ValueError:
				print("""Invalid literal for integer""")

		__A    :				Union[str, Any]    						=	binary_exponentiation(BASE, POWER)
		print(f'''{BASE}^({POWER}) : {RESULT}''')






