




"""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,			lowercase		):






			'''simple docstring'''



			def       A_					(						self						):
							_lowerCamelCase  :    str					=					load_tool('text-to-speech'						)
							self.tool.setup()
			def       A_					(						self						):
							# SpeechT5 isn't deterministic
							torch.manual_seed(0						)
							_lowerCamelCase  :    str					=					self.tool('hey'						)
							_lowerCamelCase  :    Optional[Any]					=					result.to_raw()
							self.assertTrue(
							    torch.allclose(
							        resulting_tensor[:3]						,   torch.tensor([-0.0_00_59_66_66_88_32_11_58_29, -0.0_00_36_57_64_01_90_79_50_64, -0.00_01_34_39_50_27_99_88_34_85]						)						,   )						)






			def       A_					(						self						):
							# SpeechT5 isn't deterministic
							torch.manual_seed(0						)
							_lowerCamelCase  :    List[Any]					=					self.tool('hey'						)
							_lowerCamelCase  :    Any					=					result.to_raw()
							self.assertTrue(
							    torch.allclose(
							        resulting_tensor[:3]						,   torch.tensor([-0.0_00_59_66_66_88_32_11_58_29, -0.0_00_36_57_64_01_90_79_50_64, -0.00_01_34_39_50_27_99_88_34_85]						)						,   )						)





"""simple docstring"""






from __future__ import annotations

lowercase__  		=		10







def   _snake_case    (       lowercase__	):
				_lowerCamelCase  :    List[Any]					=					1
				_lowerCamelCase  :    Optional[int]					=					max(lowercase__	)
				while placement <= max_digit:
								# declare and initialize empty buckets
								_lowerCamelCase  :    list[list]					=					[[] for _ in range(lowercase__	)]
								# split list_of_ints between the buckets
								for i in list_of_ints:
												_lowerCamelCase  :    Dict					=					int((i / placement) % RADIX	)
												buckets[tmp].append(lowercase__	)
								# put each buckets' contents into list_of_ints
								_lowerCamelCase  :    str					=					0
								for b in range(lowercase__	):
												for i in buckets[b]:
																_lowerCamelCase  :    str					=					i
																a += 1
        # move to next
								placement *= RADIX
				return list_of_ints


if __name__ == "__main__":
			import doctest

			doctest.testmod()