



"""simple docstring"""





import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
	import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin




@require_torch
class 			lowercase__			(      unittest.TestCase,					_UpperCamelCase    ):
							'''simple docstring'''







							def        lowerCamelCase_   (  self						)			->							Any:
									_UpperCAmelCase							 =		load_tool('text-to-speech'						)
									self.tool.setup()






							def        lowerCamelCase_   (  self						)			->							str:
									# SpeechT5 isn't deterministic
									torch.manual_seed(0						)
									_UpperCAmelCase							 =		self.tool('hey'						)
									_UpperCAmelCase							 =		result.to_raw()
									self.assertTrue(
									    torch.allclose(
									        resulting_tensor[:3]	,       torch.tensor([-0.0005966668832115829, -0.0003657640190795064, -0.00013439502799883485]						)	,       )						)






							def        lowerCamelCase_   (  self						)			->							Any:
									# SpeechT5 isn't deterministic
									torch.manual_seed(0						)
									_UpperCAmelCase							 =		self.tool('hey'						)
									_UpperCAmelCase							 =		result.to_raw()
									self.assertTrue(
									    torch.allclose(
									        resulting_tensor[:3]	,       torch.tensor([-0.0005966668832115829, -0.0003657640190795064, -0.00013439502799883485]						)	,       )						)







"""simple docstring"""





from __future__ import annotations




def 	UpperCAmelCase     (		A	:						int     ,				A	:						int       ):

		'''simple docstring'''


		_UpperCAmelCase							 =		[]
		create_all_state(1     ,				A     ,				A     ,				[]     ,				A       )
		return result




def 	UpperCAmelCase     (		A	:						int     ,				A	:						int     ,				A	:						int     ,				A	:						list[int]     ,				A	:						list[list[int]]     ,				):

		'''simple docstring'''


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

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




def 	UpperCAmelCase     (		A	:						list[list[int]]       ):

		'''simple docstring'''


		for i in total_list:
				print(*A       )


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


