





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    A__  (			unittest.TestCase			,  __snake_case     ):





      def 			__UpperCamelCase(					self  ):
       '''simple docstring'''




       UpperCamelCase      :   List[Any]			      =  load_tool("text-to-speech"  )
       self.tool.setup()





      def 			__UpperCamelCase(					self  ):
       '''simple docstring'''




       torch.manual_seed(0  )
       UpperCamelCase      :   List[str]			      =  self.tool("hey"  )
       UpperCamelCase      :   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 			__UpperCamelCase(					self  ):
       '''simple docstring'''




       torch.manual_seed(0  )
       UpperCamelCase      :   Dict			      =  self.tool("hey"  )
       UpperCamelCase      :   Optional[int]			      =  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]  )			,				)  )







__lowerCamelCase			:	Any					    =	9.8_0_6_6_5



def 						A_							(	_lowerCAmelCase				,  _lowerCAmelCase				,  _lowerCAmelCase = g	)		->					float:

 if fluid_density <= 0:
  raise ValueError("Impossible fluid density"	)
 if volume < 0:
  raise ValueError("Impossible Object volume"	)
 if gravity <= 0:
  raise ValueError("Impossible Gravity"	)

 return fluid_density * gravity * volume


if __name__ == "__main__":
    import doctest

    # run doctest
    doctest.testmod()
