


'''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 		lowerCAmelCase__	(	unittest.TestCase			,				lowerCamelCase__		):




			def 							lowerCAmelCase__			(						self     :   Tuple       )      ->str:



					'''simple docstring'''







					_UpperCAmelCase						:				Union[str, Any]	    =					load_tool("text-to-speech"       )
					self.tool.setup()




			def 							lowerCAmelCase__			(						self     :   List[str]       )      ->List[str]:



					'''simple docstring'''







					torch.manual_seed(0       )
					_UpperCAmelCase						:				int	    =					self.tool("hey"       )
					_UpperCAmelCase						:				Union[str, Any]	    =					result.to_raw()
					self.assertTrue(
					    torch.allclose(
					        resulting_tensor[:3]		,     torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5]       )		,     )       )






			def 							lowerCAmelCase__			(						self     :   int       )      ->Optional[Any]:



					'''simple docstring'''







					torch.manual_seed(0       )
					_UpperCAmelCase						:				Optional[Any]	    =					self.tool("hey"       )
					_UpperCAmelCase						:				List[Any]	    =					result.to_raw()
					self.assertTrue(
					    torch.allclose(
					        resulting_tensor[:3]		,     torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5]       )		,     )       )








'''simple docstring'''




def 				lowerCAmelCase_   (	_lowerCamelCase:   list[int]       ,      _lowerCamelCase:   str					):
		__SCREAMING_SNAKE_CASE       :		str           =		int(_lowerCamelCase					)

		# Initialize Result
		__SCREAMING_SNAKE_CASE       :		Tuple           =		[]

		# Traverse through all denomination
		for denomination in reversed(_lowerCamelCase					):
				# Find denominations
				while int(_lowerCamelCase					) >= int(_lowerCamelCase					):
						total_value -= int(_lowerCamelCase					)
						answer.append(_lowerCamelCase					)  # Append the "answers" array

		return answer


# Driver Code
if __name__ == "__main__":
						UpperCamelCase__       :	int    = []
						UpperCamelCase__       :	List[Any]    = '''0'''

						if (
						    input('''Do you want to enter your denominations ? (yY/n): ''').strip().lower()
						    == "y"
						):
												UpperCamelCase__       :	Tuple    = int(input('''Enter the number of denominations you want to add: ''').strip())

												for i in range(0, n):
																		denominations.append(int(input(f"Denomination {i}: ").strip()))
												UpperCamelCase__       :	str    = input('''Enter the change you want to make in Indian Currency: ''').strip()
						else:
												# All denominations of Indian Currency if user does not enter
												UpperCamelCase__       :	List[Any]    = [1, 2, 5, 10, 20, 50, 1_00, 5_00, 20_00]
												UpperCamelCase__       :	str    = input('''Enter the change you want to make: ''').strip()

						if int(value) == 0 or int(value) < 0:
												print('''The total value cannot be zero or negative.''')

						else:
												print(f"Following is minimal change for {value}: ")
												UpperCamelCase__       :	int    = find_minimum_change(denominations, value)
												# Print result
												for i in range(len(answer)):
																		print(answer[i], end=''' ''')