





'''simple docstring'''


def  __a			(  UpperCAmelCase							,      UpperCAmelCase     )   ->Optional[Any]:



	"""simple docstring"""







	A					=   (boundary[1] - boundary[0]) / steps
	A					=   boundary[0]
	A					=   boundary[1]
	A					=   make_points(UpperCAmelCase							,      UpperCAmelCase							,      UpperCAmelCase     )
	A					=   0.0
	y += (h / 3.0) * f(UpperCAmelCase     )
	A					=   2
	for i in x_i:
		y += (h / 3) * (4 - 2 * (cnt % 2)) * f(UpperCAmelCase     )
		cnt += 1
	y += (h / 3.0) * f(UpperCAmelCase     )
	return y




def  __a			(  UpperCAmelCase							,      UpperCAmelCase							,      UpperCAmelCase     )   ->Any:



	"""simple docstring"""







	A					=   a + h
	while x < (b - h):
		yield x
		A					=   x + h




def  __a			(  UpperCAmelCase     )   ->int:  # enter your function here



	"""simple docstring"""







	A					=   (x - 0) * (x - 0)
	return y




def  __a			(  )   ->List[Any]:



	"""simple docstring"""







	A					=   0.0  # Lower bound of integration
	A					=   1.0  # Upper bound of integration
	A					=   10.0  # define number of steps or resolution
	A					=   [a, b]  # define boundary of integration
	A					=   method_a(UpperCAmelCase							,      UpperCAmelCase     )
	print(f"""y = {y}"""     )


if __name__ == "__main__":
				main()





"""simple docstring"""







import unittest

from datasets import load_dataset

from transformers import load_tool

from .test_tools_common import ToolTesterMixin






class  __A							(			unittest.TestCase,       _SCREAMING_SNAKE_CASE     ):






 """simple docstring"""




 def  SCREAMING_SNAKE_CASE				(						self		)   ->	str:
     a											=load_tool('''document-question-answering'''		)
     self.tool.setup()
     a											=load_tool('''document-question-answering'''					,       remote=__A		)


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

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


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

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


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

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





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

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