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







       '''simple docstring'''

       @slow
       def 	lowercase							(self  )					->       Dict:
              _snake_case       =  FlaxXLMRobertaModel.from_pretrained("""xlm-roberta-base"""  )
              _snake_case       =  AutoTokenizer.from_pretrained("""xlm-roberta-base"""  )
              _snake_case       =  """The dog is cute and lives in the garden house"""
              _snake_case       =  jnp.array([tokenizer.encode(UpperCAmelCase  )]  )

              _snake_case       =  (1, 12, 768)  # batch_size, sequence_length, embedding_vector_dim
              _snake_case       =  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]]  )

              _snake_case       =  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

import typing
from collections import Counter






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE				):
							_snake_case       =  Counter()
							for base in range(1							, max_perimeter + 1				):
														for perpendicular in range(_SCREAMING_SNAKE_CASE							, max_perimeter + 1				):
																					_snake_case       =  (base * base + perpendicular * perpendicular) ** 0.5
																					if hypotenuse == int(_SCREAMING_SNAKE_CASE				):
																												_snake_case       =  int(base + perpendicular + hypotenuse				)
																												if perimeter > max_perimeter:
																																			continue
																												triplets[perimeter] += 1
							return triplets






def  __SCREAMING_SNAKE_CASE				(  _SCREAMING_SNAKE_CASE = 1000				):
							_snake_case       =  pythagorean_triple(_SCREAMING_SNAKE_CASE				)
							return triplets.most_common(1				)[0][0]


if __name__ == "__main__":
				print(f'''Perimeter {solution()} has maximum solutions''')