





import unittest

from datasets import load_dataset

from transformers import load_tool

from .test_tools_common import ToolTesterMixin
class 	UpperCamelCase_						(     unittest.TestCase							,     __lowerCAmelCase    ):




					def 		lowerCAmelCase	(						self     )						->							List[str]:
										_snake_case													= load_tool('document-question-answering'     )
										self.tool.setup()
										_snake_case													= load_tool('document-question-answering' ,  remote=_lowerCamelCase     )




					def 		lowerCAmelCase	(						self     )						->							int:
										_snake_case													= load_dataset('hf-internal-testing/example-documents' ,  split='test'     )
										_snake_case													= dataset[0]['image']

										_snake_case													= self.tool(_lowerCamelCase ,  'When is the coffee break?'     )
										self.assertEqual(_lowerCamelCase ,  '11-14 to 11:39 a.m.'     )




					def 		lowerCAmelCase	(						self     )						->							Any:
										_snake_case													= load_dataset('hf-internal-testing/example-documents' ,  split='test'     )
										_snake_case													= dataset[0]['image']

										_snake_case													= self.remote_tool(_lowerCamelCase ,  'When is the coffee break?'     )
										self.assertEqual(_lowerCamelCase ,  '11-14 to 11:39 a.m.'     )




					def 		lowerCAmelCase	(						self     )						->							Union[str, Any]:
										_snake_case													= load_dataset('hf-internal-testing/example-documents' ,  split='test'     )
										_snake_case													= dataset[0]['image']

										self.tool(document=_lowerCamelCase ,  question='When is the coffee break?'     )






					def 		lowerCAmelCase	(						self     )						->							Tuple:
										_snake_case													= load_dataset('hf-internal-testing/example-documents' ,  split='test'     )
										_snake_case													= dataset[0]['image']

										_snake_case													= self.remote_tool(document=_lowerCamelCase ,  question='When is the coffee break?'     )
										self.assertEqual(_lowerCamelCase ,  '11-14 to 11:39 a.m.'     )




"""simple docstring"""


from __future__ import annotations





def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					int | float:




						'''simple docstring'''



						if len(__lowerCAmelCase				) == 0:
												raise ValueError("find_max() arg is an empty sequence"				)
						lowerCamelCase__					=nums[0]
						for x in nums:
												if x > max_num:
																		lowerCamelCase__					=x
						return max_num


if __name__ == "__main__":
	import doctest

	doctest.testmod(verbose=True)


