


"""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 						_A  (  unittest.TestCase    ,__UpperCAmelCase  ):







    """simple docstring"""




    def 	__snake_case							(					self				:    List[str]):
      a						:		List[str]      							=			load_tool("text-to-speech")
      self.tool.setup()






    def 	__snake_case							(					self				:    str):
      torch.manual_seed(0)
      a						:		Any      							=			self.tool("hey")
      a						:		Dict      							=			result.to_raw()
      self.assertTrue(
          torch.allclose(
              resulting_tensor[:3]				, torch.tensor([-0.0_005_966_668_832_115_829, -0.0_003_657_640_190_795_064, -0.00_013_439_502_799_883_485])				, ))






    def 	__snake_case							(					self				:    int):
      torch.manual_seed(0)
      a						:		List[str]      							=			self.tool("hey")
      a						:		Tuple      							=			result.to_raw()
      self.assertTrue(
          torch.allclose(
              resulting_tensor[:3]				, torch.tensor([-0.0_005_966_668_832_115_829, -0.0_003_657_640_190_795_064, -0.00_013_439_502_799_883_485])				, ))













def A_	(		A__		,      A__				)  ->		str:
       if a < 0 or b < 0:
              raise ValueError('the value of both inputs must be positive'				)

       a__						:	List[str] =				str(bin(A__				)				)[2:]  # remove the leading "0b"
       a__						:	Optional[int] =				str(bin(A__				)				)[2:]  # remove the leading "0b"

       a__						:	List[str] =				max(len(A__				)		,      len(A__				)				)

       return "0b" + "".join(
           str(int(char_a == '1' and char_b == '1'				)				)
           for char_a, char_b in zip(a_binary.zfill(A__				)		,      b_binary.zfill(A__				)				)				)


if __name__ == "__main__":
    import doctest

    doctest.testmod()


