

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  UpperCamelCase_      (	unittest.TestCase		,  _snake_case      ):


  """simple docstring"""



  def   _UpperCamelCase     (						self     :					Any						)       ->			int:
      SCREAMING_SNAKE_CASE__         =    load_tool("image-question-answering"						)
      self.tool.setup()
      SCREAMING_SNAKE_CASE__         =    load_tool("image-question-answering"  ,	remote=A_						)



  def   _UpperCamelCase     (						self     :					Optional[int]						)       ->			Any:
      SCREAMING_SNAKE_CASE__         =    Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"						)						) / "000000039769.png"						)
      SCREAMING_SNAKE_CASE__         =    self.tool(A_  ,	"How many cats are sleeping on the couch?"						)
      self.assertEqual(A_  ,	"2"						)



  def   _UpperCamelCase     (						self     :					List[Any]						)       ->			Optional[int]:
      SCREAMING_SNAKE_CASE__         =    Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"						)						) / "000000039769.png"						)
      SCREAMING_SNAKE_CASE__         =    self.remote_tool(A_  ,	"How many cats are sleeping on the couch?"						)
      self.assertEqual(A_  ,	"2"						)



  def   _UpperCamelCase     (						self     :					str						)       ->			List[str]:
      SCREAMING_SNAKE_CASE__         =    Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"						)						) / "000000039769.png"						)
      SCREAMING_SNAKE_CASE__         =    self.tool(image=A_  ,	question="How many cats are sleeping on the couch?"						)
      self.assertEqual(A_  ,	"2"						)







  def   _UpperCamelCase     (						self     :					List[str]						)       ->			Optional[int]:
      SCREAMING_SNAKE_CASE__         =    Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"						)						) / "000000039769.png"						)
      SCREAMING_SNAKE_CASE__         =    self.remote_tool(image=A_  ,	question="How many cats are sleeping on the couch?"						)
      self.assertEqual(A_  ,	"2"						)





A__										=      10**8





def 				__a							(       __A						):
    if n % 10 == 0:
        return False
    SCREAMING_SNAKE_CASE__         =    str(__A						)
    return s == s[::-1]





def 				__a							(       ):
    SCREAMING_SNAKE_CASE__         =    set()
    SCREAMING_SNAKE_CASE__         =    1
    SCREAMING_SNAKE_CASE__         =    5
    while sum_squares < LIMIT:
        SCREAMING_SNAKE_CASE__         =    first_square + 1
        while sum_squares < LIMIT:
            if is_palindrome(__A						):
                answer.add(__A						)
            last_square += 1
            sum_squares += last_square**2
        first_square += 1
        SCREAMING_SNAKE_CASE__         =    first_square**2 + (first_square + 1) ** 2

    return sum(__A						)


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


