

"""simple docstring"""

import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
							import torch


class       _snake_case  (    unittest.TestCase    ,      snake_case__							):







						def 							_UpperCamelCase     (self				)      ->    List[Any]:
											__lowercase        =      load_tool('''speech-to-text'''				)
											self.tool.setup()







						def 							_UpperCamelCase     (self				)      ->    Optional[int]:
											__lowercase        =      self.tool(torch.ones(3_0_0_0				)				)
											self.assertEqual(lowercase_  ,				''' you'''				)







						def 							_UpperCamelCase     (self				)      ->    Union[str, Any]:
											__lowercase        =      self.tool(audio=torch.ones(3_0_0_0				)				)
											self.assertEqual(lowercase_  ,				''' you'''				)




'''simple docstring'''
def     UpperCamelCase_  (						__SCREAMING_SNAKE_CASE							):
    """simple docstring"""






    if number != int(__SCREAMING_SNAKE_CASE							):
        raise ValueError("factorial() only accepts integral values"							)
    if number < 0:
        raise ValueError("factorial() not defined for negative values"							)
    snake_case_			:     int        =    1
    for i in range(1,		number + 1							):
        value *= i
    return value

def     UpperCamelCase_  (						__SCREAMING_SNAKE_CASE							):
    """simple docstring"""






    if not isinstance(__SCREAMING_SNAKE_CASE,		__SCREAMING_SNAKE_CASE							):
        raise ValueError("factorial() only accepts integral values"							)
    if n < 0:
        raise ValueError("factorial() not defined for negative values"							)
    return 1 if n == 0 or n == 1 else n * factorial(n - 1							)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a_           =    int(input("Enter a positive integer: ").strip() or 0)
  print(f"""factorial{n} is {factorial(n)}""")




