

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

  def 				__lowercase    (					self						:     List[str]      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Optional[int]   				=   load_tool("""speech-to-text"""      )
   self.tool.setup()

  def 				__lowercase    (					self						:     Optional[Any]      ):






   '''simple docstring'''
   UpperCAmelCase__   :					List[Any]   				=   self.tool(torch.ones(3_000      )      )
   self.assertEqual(A   ,""" you"""      )




  def 				__lowercase    (					self						:     int      ):






   '''simple docstring'''
   UpperCAmelCase__   :					Any   				=   self.tool(audio=torch.ones(3_000      )      )
   self.assertEqual(A   ,""" you"""      )








"""simple docstring"""




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





 UpperCAmelCase__   :					Union[str, Any]   				=   1
 UpperCAmelCase__   :					Union[str, Any]   				=   0
 UpperCAmelCase__   :					List[str]   				=   1
 UpperCAmelCase__   :					Any   				=   1
 UpperCAmelCase__   :					Optional[int]   				=   3
 UpperCAmelCase__   :					Any   				=   3
 UpperCAmelCase__   :					Optional[Any]   				=   limit
 UpperCAmelCase__   :					Dict   				=   0

 UpperCAmelCase__   :					int   				=   """"""
 while counter != decimal + 1:
  if 4 * q + r - t < n * t:
   result += str(__UpperCamelCase )
   if counter == 0:
    result += "."

   if decimal == counter:
    break

   counter += 1
   UpperCAmelCase__   :					Union[str, Any]   				=   10 * (r - n * t)
   UpperCAmelCase__   :					int   				=   ((10 * (3 * q + r)) // t) - 10 * n
   q *= 10
   UpperCAmelCase__   :					str   				=   nr
  else:
   UpperCAmelCase__   :					List[str]   				=   (2 * q + r) * l
   UpperCAmelCase__   :					Union[str, Any]   				=   (q * (7 * k) + 2 + (r * l)) // (t * l)
   q *= k
   t *= l
   l += 2
   k += 1
   UpperCAmelCase__   :					Optional[Any]   				=   nn
   UpperCAmelCase__   :					str   				=   nr
 return result
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 print(F"{calculate_pi(50 ) = }" )
 import doctest

 doctest.testmod()


if __name__ == "__main__":
      main()





