'''simple docstring'''





import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
    from transformers import AutoModelForSeqaSeqLM, AutoTokenizer




@require_torch
@require_sentencepiece
@require_tokenizers
class        __A      ( unittest.TestCase	):



    @slow
    def 					_lowercase						(self    :    Union[str, Any] ):
         UpperCAmelCase_           =   AutoModelForSeqaSeqLM.from_pretrained("google/mt5-small"   ,			return_dict=__a ).to(__a )
         UpperCAmelCase_           =   AutoTokenizer.from_pretrained("google/mt5-small" )

         UpperCAmelCase_           =   tokenizer("Hello there"   ,			return_tensors="pt" ).input_ids
         UpperCAmelCase_           =   tokenizer("Hi I am"   ,			return_tensors="pt" ).input_ids

         UpperCAmelCase_           =   model(input_ids.to(__a )   ,			labels=labels.to(__a ) ).loss
         UpperCAmelCase_           =   -(labels.shape[-1] * loss.item())

         UpperCAmelCase_           =   -84.91_27
         self.assertTrue(abs(mtf_score - EXPECTED_SCORE ) < 1E-4 )












from __future__ import annotations


def __A    (      __lowerCAmelCase	)->  list[int]:





						"""simple docstring"""



						_UpperCAmelCase									=			2
						_UpperCAmelCase									=			[]
						while i * i <= n:
												if n % i:
																		i += 1
												else:
																		n //= i
																		factors.append(__lowerCAmelCase	)
						if n > 1:
												factors.append(__lowerCAmelCase	)
						return factors


if __name__ == "__main__":
		import doctest

		doctest.testmod()
