


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




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       a						:List[Any] 							=       load_tool('''text-to-speech'''    )
       self.tool.setup()




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       # SpeechT5 isn't deterministic
       torch.manual_seed(0    )
       a						:int 							=       self.tool('''hey'''    )
       a						:Tuple 							=       result.to_raw()
       self.assertTrue(
           torch.allclose(
               resulting_tensor[:3]					,  torch.tensor([-0.000_5966_6688_3211_5829, -0.000_3657_6401_9079_5064, -0.0001_3439_5027_9988_3485]    )					,  )    )




 def        SCREAMING_SNAKE_CASE__				(		self    ):
       # SpeechT5 isn't deterministic
       torch.manual_seed(0    )
       a						:Optional[int] 							=       self.tool('''hey'''    )
       a						:List[Any] 							=       result.to_raw()
       self.assertTrue(
           torch.allclose(
               resulting_tensor[:3]					,  torch.tensor([-0.000_5966_6688_3211_5829, -0.000_3657_6401_9079_5064, -0.0001_3439_5027_9988_3485]    )					,  )    )









from maths.prime_factors import prime_factors
def 				__lowerCamelCase						( UpperCAmelCase_						:		int						):




      """simple docstring"""





      if not isinstance(UpperCAmelCase_ ,  UpperCAmelCase_						):
            a						:Dict 							=       F'''Input value of [number={number}] must be an integer'''
            raise TypeError(UpperCAmelCase_						)
      if number < 1:
            raise ValueError('''Input must be a positive integer'''						)
      return -1 if len(prime_factors(UpperCAmelCase_						)						) % 2 else 1


if __name__ == "__main__":
     import doctest

     doctest.testmod()





