"""simple docstring"""


import unittest

from datasets import load_dataset

from transformers import load_tool

from .test_tools_common import ToolTesterMixin






class    __UpperCAmelCase						(	unittest.TestCase      ,      __lowerCAmelCase	):

				def 		_a	(      self      ):
										lowerCamelCase__					=load_tool("document-question-answering"      )
										self.tool.setup()
										lowerCamelCase__					=load_tool("document-question-answering"	, remote=_lowerCamelCase      )

				def 		_a	(      self      ):
										lowerCamelCase__					=load_dataset("hf-internal-testing/example-documents"	, split="test"      )
										lowerCamelCase__					=dataset[0]["image"]

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

				def 		_a	(      self      ):
										lowerCamelCase__					=load_dataset("hf-internal-testing/example-documents"	, split="test"      )
										lowerCamelCase__					=dataset[0]["image"]

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

				def 		_a	(      self      ):
										lowerCamelCase__					=load_dataset("hf-internal-testing/example-documents"	, split="test"      )
										lowerCamelCase__					=dataset[0]["image"]

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






				def 		_a	(      self      ):
										lowerCamelCase__					=load_dataset("hf-internal-testing/example-documents"	, split="test"      )
										lowerCamelCase__					=dataset[0]["image"]

										lowerCamelCase__					=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)


