


'''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):







    """simple docstring"""



    @slow
    def __lowercase   (   self    :  Optional[Any]		)   ->  Union[str, Any]:
      lowerCAmelCase_			:      Dict			=   TFAutoModelForSeqaSeqLM.from_pretrained("""google/mt5-small"""		)
      lowerCAmelCase_			:      Tuple			=   AutoTokenizer.from_pretrained("""google/mt5-small"""		)

      lowerCAmelCase_			:      str			=   tokenizer("""Hello there"""    ,						return_tensors="""tf"""		).input_ids
      lowerCAmelCase_			:      Dict			=   tokenizer("""Hi I am"""    ,						return_tensors="""tf"""		).input_ids

      lowerCAmelCase_			:      str			=   model(lowerCamelCase    ,						labels=lowerCamelCase		).loss
      lowerCAmelCase_			:      int			=   -tf.math.reduce_mean(lowerCamelCase		).numpy()

      lowerCAmelCase_			:      List[Any]			=   -21.228_168
      self.assertTrue(abs(mtf_score - EXPECTED_SCORE		) < 2E-4		)







'''simple docstring'''






from math import ceil







def 				UpperCamelCase_			(    A__					:   int = 10_01					):
  '''simple docstring'''





  lowerCAmelCase_			:      List[Any]			=   1

  for i in range(1							,    int(ceil(n / 2.0					)					)					):
    lowerCAmelCase_			:      int			=   2 * i + 1
    lowerCAmelCase_			:      Tuple			=   2 * i
    lowerCAmelCase_			:      Tuple			=   total + 4 * odd**2 - 6 * even

  return total


if __name__ == "__main__":
  import sys

  if len(sys.argv) == 1:
    print(solution())
  else:
    try:
      __A					:  str											=      int(sys.argv[1])
      print(solution(n))
    except ValueError:
      print("Invalid entry - please enter a number")



