
def 				lowercase      (_lowerCAmelCase		):
						return -num if num < 0 else num

def 				lowercase      (_lowerCAmelCase		):
						if len(lowercase__		) == 0:
												raise ValueError("""abs_min() arg is an empty sequence"""		)
						__lowerCAmelCase        =       x[0]
						for i in x:
												if abs_val(lowercase__		) < abs_val(lowercase__		):
																		__lowerCAmelCase        =       i
						return j

def 				lowercase      (_lowerCAmelCase		):
						if len(lowercase__		) == 0:
												raise ValueError("""abs_max() arg is an empty sequence"""		)
						__lowerCAmelCase        =       x[0]
						for i in x:
												if abs(lowercase__		) > abs(lowercase__		):
																		__lowerCAmelCase        =       i
						return j

def 				lowercase      (_lowerCAmelCase		):
						if len(lowercase__		) == 0:
												raise ValueError("""abs_max_sort() arg is an empty sequence"""		)
						return sorted(lowercase__				,  key=lowercase__		)[-1]

def 				lowercase      ():
						assert abs_val(0		) == 0
						assert abs_val(34		) == 34
						assert abs_val(-1000_0000_0000		) == 1000_0000_0000

						__lowerCAmelCase        =       [-3, -1, 2, -11]
						assert abs_max(lowercase__		) == -11
						assert abs_max_sort(lowercase__		) == -11
						assert abs_min(lowercase__		) == -1


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			test_abs_val()
			print(abs_val(-34))  # --> 34


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



							'''simple docstring'''





							def  A__		(				self							)   ->       Any:
													__lowerCAmelCase        =       load_tool("""speech-to-text"""							)
													self.tool.setup()




							def  A__		(				self							)   ->       int:
													__lowerCAmelCase        =       self.tool(torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)




							def  A__		(				self							)   ->       Optional[int]:
													__lowerCAmelCase        =       self.tool(audio=torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)
