
"""simple docstring"""






import unittest

from datasets import load_dataset

from transformers import load_tool

from .test_tools_common import ToolTesterMixin





class 							snake_case       (     unittest.TestCase							,       SCREAMING_SNAKE_CASE_		):







   def    UpperCAmelCase__	( self)   ->Tuple:
      a_						   =     load_tool("document-question-answering")
      self.tool.setup()
      a_						   =     load_tool("document-question-answering"       ,							remote=UpperCAmelCase_)







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

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







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

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







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

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







   def    UpperCAmelCase__	( self)   ->List[Any]:
      a_						   =     load_dataset("hf-internal-testing/example-documents"       ,							split="test")
      a_						   =     dataset[0]["""image"""]

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




"""simple docstring"""







from math import factorial


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase   ,				__UpperCAmelCase      ):
		return factorial(__UpperCAmelCase      ) / (factorial(__UpperCAmelCase      ) * factorial(n - r      ))


def  __SCREAMING_SNAKE_CASE (  ):
		_lowercase				: Optional[Any]     =   0

		for i in range(1   ,				101      ):
				for j in range(1   ,				i + 1      ):
						if combinations(__UpperCAmelCase   ,				__UpperCAmelCase      ) > 1E6:
								total += 1
		return total


if __name__ == "__main__":
		print(solution())



