

'''simple docstring'''

from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow


if is_tf_available():
    import tensorflow as tf

    from transformers import AutoTokenizer, TFAutoModelForSeqaSeqLM





@require_tf
@require_sentencepiece
@require_tokenizers
class 							_snake_case (       unittest.TestCase						):
   @slow
   def     __UpperCamelCase						( self			:      List[Any]							):
     SCREAMING_SNAKE_CASE:Dict						      =					TFAutoModelForSeqaSeqLM.from_pretrained("google/mt5-small"							)
     SCREAMING_SNAKE_CASE:Optional[int]						      =					AutoTokenizer.from_pretrained("google/mt5-small"							)

     SCREAMING_SNAKE_CASE:str						      =					tokenizer("Hello there"     ,return_tensors="tf"							).input_ids
     SCREAMING_SNAKE_CASE:Optional[int]						      =					tokenizer("Hi I am"     ,return_tensors="tf"							).input_ids

     SCREAMING_SNAKE_CASE:List[Any]						      =					model(SCREAMING_SNAKE_CASE__     ,labels=SCREAMING_SNAKE_CASE__							).loss
     SCREAMING_SNAKE_CASE:Dict						      =					-tf.math.reduce_mean(SCREAMING_SNAKE_CASE__							).numpy()

     SCREAMING_SNAKE_CASE:Dict						      =					-21.228_168
     self.assertTrue(abs(mtf_score - EXPECTED_SCORE							) < 2e-4							)









'''simple docstring'''

def    A_  ( snake_case ):
  SCREAMING_SNAKE_CASE:Dict						      =					(1 + 24 * n) ** 0.5
  return ((1 + root) / 6) % 1 == 0





def    A_  ( snake_case = 5000 ):
  SCREAMING_SNAKE_CASE:int						      =					[(i * (3 * i - 1)) // 2 for i in range(1      ,       snake_case )]
  for i, pentagonal_i in enumerate(snake_case ):
    for j in range(snake_case      ,       len(snake_case ) ):
      SCREAMING_SNAKE_CASE:int						      =					pentagonal_nums[j]
      SCREAMING_SNAKE_CASE:Any						      =					pentagonal_i + pentagonal_j
      SCREAMING_SNAKE_CASE:int						      =					pentagonal_j - pentagonal_i
      if is_pentagonal(snake_case ) and is_pentagonal(snake_case ):
        return b

  return -1


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






