






import unittest

from transformers import AutoConfig, AutoTokenizer, BertConfig, TensorType, is_flax_available
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, require_flax, slow


if is_flax_available():
				import jax

				from transformers.models.auto.modeling_flax_auto import FlaxAutoModel
				from transformers.models.bert.modeling_flax_bert import FlaxBertModel
				from transformers.models.roberta.modeling_flax_roberta import FlaxRobertaModel

@require_flax
class 		_snake_case	(	unittest.TestCase       ):






			@slow
			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Optional[int]:
						for model_name in ["bert-base-cased", "bert-large-uncased"]:
									with self.subTest(a):
												SCREAMING_SNAKE_CASE							=			AutoConfig.from_pretrained(a)
												self.assertIsNotNone(a)
												self.assertIsInstance(a		,       a)

												SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained(a)
												self.assertIsNotNone(a)
												self.assertIsInstance(a		,       a)






			@slow
			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Any:
						for model_name in ["roberta-base", "roberta-large"]:
									with self.subTest(a):
												SCREAMING_SNAKE_CASE							=			AutoConfig.from_pretrained(a)
												self.assertIsNotNone(a)
												self.assertIsInstance(a		,       a)

												SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained(a)
												self.assertIsNotNone(a)
												self.assertIsInstance(a		,       a)






			@slow
			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Optional[int]:
						for model_name in ["bert-base-cased", "bert-large-uncased"]:
									SCREAMING_SNAKE_CASE							=			AutoTokenizer.from_pretrained(a)
									SCREAMING_SNAKE_CASE							=			FlaxBertModel.from_pretrained(a)
									SCREAMING_SNAKE_CASE							=			tokenizer('Do you support jax jitted function?'		,       return_tensors=TensorType.JAX)

									@jax.jit
									def eval(**a):
												return model(**a)

									eval(**a).block_until_ready()






			@slow
			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Dict:
						for model_name in ["roberta-base", "roberta-large"]:
									SCREAMING_SNAKE_CASE							=			AutoTokenizer.from_pretrained(a)
									SCREAMING_SNAKE_CASE							=			FlaxRobertaModel.from_pretrained(a)
									SCREAMING_SNAKE_CASE							=			tokenizer('Do you support jax jitted function?'		,       return_tensors=TensorType.JAX)

									@jax.jit
									def eval(**a):
												return model(**a)

									eval(**a).block_until_ready()






			def  SCREAMING_SNAKE_CASE__     (							self)   ->							List[str]:
						with self.assertRaisesRegex(
						    a		,       'bert-base is not a local folder and is not a valid model identifier'):
									SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained('bert-base')






			def  SCREAMING_SNAKE_CASE__     (							self)   ->							int:
						with self.assertRaisesRegex(
						    a		,       R'aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)'):
									SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained(a		,       revision='aaaaaa')






			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Optional[int]:
						with self.assertRaisesRegex(
						    a		,       'hf-internal-testing/config-no-model does not appear to have a file named flax_model.msgpack'		,       ):
									SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained('hf-internal-testing/config-no-model')







			def  SCREAMING_SNAKE_CASE__     (							self)   ->							Tuple:
						with self.assertRaisesRegex(a		,       'Use `from_pt=True` to load this model'):
									SCREAMING_SNAKE_CASE							=			FlaxAutoModel.from_pretrained('hf-internal-testing/tiny-bert-pt-only')








'''simple docstring'''


def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if b == 0:
								return 1
				if (b % 2) == 0:
								return actual_power(SCREAMING_SNAKE_CASE__				, int(b / 2	)	) * actual_power(SCREAMING_SNAKE_CASE__				, int(b / 2	)	)
				else:
								return a * actual_power(SCREAMING_SNAKE_CASE__				, int(b / 2	)	) * actual_power(SCREAMING_SNAKE_CASE__				, int(b / 2	)	)







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if b < 0:
								return 1 / actual_power(SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	)
				return actual_power(SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	)


if __name__ == "__main__":
				print(power(-2, -3))




