



"""simple docstring"""
from __future__ import annotations



def 				lowerCAmelCase_(      lowercase_   :							list							)		->				int | float:
				_lowerCamelCase					     = sorted(lowercase_							)
				_lowerCamelCase					     = len(lowercase_							)
				_lowerCamelCase					     = length >> 1
				return (
				    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
				    if length % 2 == 0
				    else sorted_list[mid_index]
				)



def 				lowerCAmelCase_(      )		->				List[str]:
				import doctest

				doctest.testmod()


if __name__ == "__main__":
			main()







import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
	import torch




class      UpperCamelCase_				(   unittest.TestCase ,     UpperCamelCase__			):


							def    _snake_case     (							self			:Dict						)      ->      Union[str, Any]:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=					load_tool("""speech-to-text"""						)
									self.tool.setup()


							def    _snake_case     (							self			:str						)      ->      Union[str, Any]:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=					self.tool(torch.ones(3000						)						)
									self.assertEqual(__A							, """ you"""						)


							def    _snake_case     (							self			:Union[str, Any]						)      ->      Union[str, Any]:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=					self.tool(audio=torch.ones(3000						)						)
									self.assertEqual(__A							, """ you"""						)