





def A_	(		A__				)  ->		bool:
       if not isinstance(A__		,      A__				):
              a__						:	List[str] =				F'Input value of [number={number}] must be an integer'
              raise TypeError(A__				)
       if number < 0:
              return False
       a__						:	int =				number * number
       while number > 0:
              if number % 10 != number_square % 10:
                     return False
              number //= 10
              number_square //= 10
       return True


if __name__ == "__main__":
    import doctest

    doctest.testmod()







import json
import os
import tempfile

from transformers.testing_utils import check_json_file_has_correct_format

class 		UpperCAmelCase__			:




			'''simple docstring'''






			UpperCamelCase									=       None




			def  snake_case__     (   self							: List[str] ):
					'''simple docstring'''





					__UpperCAmelCase    :     List[Any]													=	self.feature_extraction_class(**self.feat_extract_dict )
					__UpperCAmelCase    :     Optional[int]													=	json.loads(feat_extract.to_json_string() )
					for key, value in self.feat_extract_dict.items():
							self.assertEqual(obj[key]       ,       a_ )




			def  snake_case__     (   self							: Any ):
					'''simple docstring'''





					__UpperCAmelCase    :     str													=	self.feature_extraction_class(**self.feat_extract_dict )

					with tempfile.TemporaryDirectory() as tmpdirname:
							__UpperCAmelCase    :     Union[str, Any]													=	os.path.join(a_       ,       '''feat_extract.json''' )
							feat_extract_first.to_json_file(a_ )
							__UpperCAmelCase    :     Any													=	self.feature_extraction_class.from_json_file(a_ )

					self.assertEqual(feat_extract_second.to_dict()       ,       feat_extract_first.to_dict() )




			def  snake_case__     (   self							: Optional[int] ):
					'''simple docstring'''





					__UpperCAmelCase    :     Tuple													=	self.feature_extraction_class(**self.feat_extract_dict )

					with tempfile.TemporaryDirectory() as tmpdirname:
							__UpperCAmelCase    :     List[str]													=	feat_extract_first.save_pretrained(a_ )[0]
							check_json_file_has_correct_format(a_ )
							__UpperCAmelCase    :     Optional[Any]													=	self.feature_extraction_class.from_pretrained(a_ )

					self.assertEqual(feat_extract_second.to_dict()       ,       feat_extract_first.to_dict() )




			def  snake_case__     (   self							: Dict ):
					'''simple docstring'''





					__UpperCAmelCase    :     int													=	self.feature_extraction_class()
					self.assertIsNotNone(a_ )





