"""simple docstring"""


import unittest

from transformers.image_processing_utils import get_size_dict
class   UpperCAmelCase_	(				unittest.TestCase   ):
    def 		_lowerCamelCase      (	self			:       List[Any]		)						->    List[str]:
       _lowercase							     =       {"wrong_key": 2_2_4}
       with self.assertRaises(_lowercase		):
          get_size_dict(_lowercase		)

       _lowercase							     =       {"height": 2_2_4}
       with self.assertRaises(_lowercase		):
          get_size_dict(_lowercase		)

       _lowercase							     =       {"width": 2_2_4, "shortest_edge": 2_2_4}
       with self.assertRaises(_lowercase		):
          get_size_dict(_lowercase		)

       # Test a dict with the correct keys is returned as is
       _lowercase							     =       {"height": 2_2_4, "width": 2_2_4}
       _lowercase							     =       get_size_dict(_lowercase		)
       self.assertEqual(_lowercase   ,						_lowercase		)

       _lowercase							     =       {"shortest_edge": 2_2_4}
       _lowercase							     =       get_size_dict(_lowercase		)
       self.assertEqual(_lowercase   ,						{"shortest_edge": 2_2_4}		)

       _lowercase							     =       {"longest_edge": 2_2_4, "shortest_edge": 2_2_4}
       _lowercase							     =       get_size_dict(_lowercase		)
       self.assertEqual(_lowercase   ,						{"longest_edge": 2_2_4, "shortest_edge": 2_2_4}		)

       # Test a single int value which  represents (size, size)
       _lowercase							     =       get_size_dict(2_2_4		)
       self.assertEqual(_lowercase   ,						{"height": 2_2_4, "width": 2_2_4}		)

       # Test a single int value which represents the shortest edge
       _lowercase							     =       get_size_dict(2_2_4   ,						default_to_square=_lowercase		)
       self.assertEqual(_lowercase   ,						{"shortest_edge": 2_2_4}		)

       # Test a tuple of ints which represents (height, width)
       _lowercase							     =       get_size_dict((1_5_0, 2_0_0)		)
       self.assertEqual(_lowercase   ,						{"height": 1_5_0, "width": 2_0_0}		)

       # Test a tuple of ints which represents (width, height)
       _lowercase							     =       get_size_dict((1_5_0, 2_0_0)   ,						height_width_order=_lowercase		)
       self.assertEqual(_lowercase   ,						{"height": 2_0_0, "width": 1_5_0}		)

       # Test an int representing the shortest edge and max_size which represents the longest edge
       _lowercase							     =       get_size_dict(2_2_4   ,						max_size=2_5_6   ,						default_to_square=_lowercase		)
       self.assertEqual(_lowercase   ,						{"shortest_edge": 2_2_4, "longest_edge": 2_5_6}		)

       # Test int with default_to_square=True and max_size fails
       with self.assertRaises(_lowercase		):
          get_size_dict(2_2_4   ,						max_size=2_5_6   ,						default_to_square=_lowercase		)




UpperCAmelCase__  =			10**8





def 				A      (	_UpperCAmelCase							:  int       )							->					bool:







			'''simple docstring'''
			if n % 10 == 0:
						return False
			_UpperCAmelCase									=  str(_UpperCAmelCase       )
			return s == s[::-1]





def 				A      (	)							->					int:







			'''simple docstring'''
			_UpperCAmelCase									=  set()
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  5
			while sum_squares < LIMIT:
						_UpperCAmelCase									=  first_square + 1
						while sum_squares < LIMIT:
									if is_palindrome(_UpperCAmelCase       ):
												answer.add(_UpperCAmelCase       )
									last_square += 1
									sum_squares += last_square**2
						first_square += 1
						_UpperCAmelCase									=  first_square**2 + (first_square + 1) ** 2

			return sum(_UpperCAmelCase       )


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