

"""simple docstring"""


import unittest

from transformers import AutoTokenizer, is_flax_available
from transformers.testing_utils import require_flax, require_sentencepiece, require_tokenizers, slow


if is_flax_available():
			import jax.numpy as jnp

			from transformers import FlaxXLMRobertaModel





@require_sentencepiece
@require_tokenizers
@require_flax
class     snake_case	(				unittest.TestCase  ):

				@slow
				def 							lowercase_     (	self							:				Any)->   List[str]:



						'''simple docstring'''


						__lowerCAmelCase:       Tuple          =			FlaxXLMRobertaModel.from_pretrained("xlm-roberta-base")
						__lowerCAmelCase:       Optional[Any]          =			AutoTokenizer.from_pretrained("xlm-roberta-base")
						__lowerCAmelCase:       int          =			"The dog is cute and lives in the garden house"
						__lowerCAmelCase:       Union[str, Any]          =			jnp.array([tokenizer.encode(UpperCamelCase__)])

						__lowerCAmelCase:       Union[str, Any]          =			(1, 1_2, 7_6_8)  # batch_size, sequence_length, embedding_vector_dim
						__lowerCAmelCase:       int          =			jnp.array(
						    [[-0.0101, 0.1218, -0.0803, 0.0801, 0.1327, 0.0776, -0.1215, 0.2383, 0.3338, 0.3106, 0.0300, 0.0252]])

						__lowerCAmelCase:       str          =			model(UpperCamelCase__)["last_hidden_state"]
						self.assertEqual(output.shape     ,  UpperCamelCase__)
						# compare the actual values for a slice of last dim
						self.assertTrue(jnp.allclose(output[:, :, -1]     ,  UpperCamelCase__     ,  atol=1e-3))





"""simple docstring"""


from __future__ import annotations






def     a__    (    __SCREAMING_SNAKE_CASE )	->	bool:
		__lowerCAmelCase:       Tuple          =			str(__SCREAMING_SNAKE_CASE )
		return len(__SCREAMING_SNAKE_CASE ) == 9 and set(__SCREAMING_SNAKE_CASE ) == set("123456789" )






def     a__    (    )	->	int | None:
		for base_num in range(9_9_9_9					, 4_9_9_9					, -1 ):
				__lowerCAmelCase:       Tuple          =			1_0_0_0_0_2 * base_num
				if is_9_pandigital(__SCREAMING_SNAKE_CASE ):
						return candidate

		for base_num in range(3_3_3					, 9_9					, -1 ):
				__lowerCAmelCase:       int          =			1_0_0_2_0_0_3 * base_num
				if is_9_pandigital(__SCREAMING_SNAKE_CASE ):
						return candidate

		return None


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


