





"""simple docstring"""





from __future__ import annotations


def       a__					(					_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		UpperCamelCase   =	[]
		create_all_state(1  ,	_lowerCAmelCase  ,	_lowerCAmelCase  ,	[]  ,	_lowerCAmelCase    )
		return result


def       a__					(					_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	):




		"""simple docstring"""


		if level == 0:
				total_list.append(current_list[:]    )
				return

		for i in range(_lowerCAmelCase  ,	total_number - level + 2    ):
				current_list.append(_lowerCAmelCase    )
				create_all_state(i + 1  ,	_lowerCAmelCase  ,	level - 1  ,	_lowerCAmelCase  ,	_lowerCAmelCase    )
				current_list.pop()


def       a__					(					_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		for i in total_list:
				print(*_lowerCAmelCase    )


if __name__ == "__main__":
						lowerCAmelCase__     			=			4
						lowerCAmelCase__     			=			2
						lowerCAmelCase__     			=			generate_all_combinations(n, k)
						print_all_state(total_list)













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


						@slow
						def     snake_case_   (self		) ->   List[str]:
								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.9127
								self.assertTrue(abs(mtf_score - EXPECTED_SCORE		) < 1e-4		)






