






"""simple docstring"""



import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
    from PIL import Image

class 	a					(       unittest.TestCase,    a_     ):







     def       UpperCamelCase_				(      self	):
       lowercase							   =	load_tool('image-question-answering'	)
       self.tool.setup()
       lowercase							   =	load_tool('image-question-answering'							,		remote=_lowerCamelCase	)







     def       UpperCamelCase_				(      self	):
       lowercase							   =	Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
       lowercase							   =	self.tool(_lowerCamelCase							,		'How many cats are sleeping on the couch?'	)
       self.assertEqual(_lowerCamelCase							,		'2'	)







     def       UpperCamelCase_				(      self	):
       lowercase							   =	Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
       lowercase							   =	self.remote_tool(_lowerCamelCase							,		'How many cats are sleeping on the couch?'	)
       self.assertEqual(_lowerCamelCase							,		'2'	)







     def       UpperCamelCase_				(      self	):
       lowercase							   =	Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
       lowercase							   =	self.tool(image=_lowerCamelCase							,		question='How many cats are sleeping on the couch?'	)
       self.assertEqual(_lowerCamelCase							,		'2'	)







     def       UpperCamelCase_				(      self	):
       lowercase							   =	Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
       lowercase							   =	self.remote_tool(image=_lowerCamelCase							,		question='How many cats are sleeping on the couch?'	)
       self.assertEqual(_lowerCamelCase							,		'2'	)










"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  for a in range(3_00   ):
    for b in range(a + 1		, 4_00   ):
      for c in range(b + 1		, 5_00   ):
        if (a + b + c) == 10_00 and (a**2) + (b**2) == (c**2):
          return a * b * c

  return -1
def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  for a in range(3_00   ):
    for b in range(4_00   ):
      lowercase							   =	10_00 - a - b
      if a < b < c and (a**2) + (b**2) == (c**2):
        return a * b * c

  return -1
def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  import timeit

  print(
      timeit.timeit('solution()'		, setup='from __main__ import solution'		, number=10_00   )   )
  print(
      timeit.timeit(
          'solution_fast()'		, setup='from __main__ import solution_fast'		, number=10_00   )   )


if __name__ == "__main__":
    print(F'''{solution() = }''')


