





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     lowercase__       (	unittest.TestCase				):

   '''simple docstring'''


   @slow
   def       UpperCamelCase__  (    self							) ->      Dict:






       """simple docstring"""
       UpperCamelCase__							:				Any          =      FlaxXLMRobertaModel.from_pretrained('''xlm-roberta-base'''							)
       UpperCamelCase__							:				Any          =      AutoTokenizer.from_pretrained('''xlm-roberta-base'''							)
       UpperCamelCase__							:				str          =      '''The dog is cute and lives in the garden house'''
       UpperCamelCase__							:				List[Any]          =      jnp.array([tokenizer.encode(__magic_name__							)]							)

       UpperCamelCase__							:				List[str]          =      (1, 12, 768)  # batch_size, sequence_length, embedding_vector_dim
       UpperCamelCase__							:				List[str]          =      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]]							)

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








def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	bool:
    return str(__UpperCAmelCase      ) == str(__UpperCAmelCase      )[::-1]




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int      )      ->	int:
    return int(__UpperCAmelCase      ) + int(str(__UpperCAmelCase      )[::-1]      )




def 		lowerCAmelCase_    (  __UpperCAmelCase:			int = 1_0000      )      ->	int:
    UpperCamelCase__							:				Optional[Any]          =      []
    for num in range(1		,   __UpperCAmelCase      ):
        UpperCamelCase__							:				str          =      0
        UpperCamelCase__							:				Any          =      num
        while iterations < 50:
            UpperCamelCase__							:				List[Any]          =      sum_reverse(__UpperCAmelCase      )
            iterations += 1
            if is_palindrome(__UpperCAmelCase      ):
                break
        else:
            lychrel_nums.append(__UpperCAmelCase      )
    return len(__UpperCAmelCase      )


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

