

import json
import os
import tempfile

from transformers.testing_utils import check_json_file_has_correct_format

class 				UpperCAmelCase_		:
							"""simple docstring"""







							UpperCAmelCase__       :						Optional[Any]	    =    None


							def 				__lowercase				(			self       )    ->    Dict:
												_a	:    int         =		self.feature_extraction_class(**self.feat_extract_dict       )
												_a	:    Optional[Any]         =		json.loads(feat_extract.to_json_string()       )
												for key, value in self.feat_extract_dict.items():
																	self.assertEqual(obj[key]       ,							_a       )


							def 				__lowercase				(			self       )    ->    Union[str, Any]:
												_a	:    Optional[int]         =		self.feature_extraction_class(**self.feat_extract_dict       )

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

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


							def 				__lowercase				(			self       )    ->    int:
												_a	:    str         =		self.feature_extraction_class(**self.feat_extract_dict       )

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

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




							def 				__lowercase				(			self       )    ->    Optional[int]:
												_a	:    Any         =		self.feature_extraction_class()
												self.assertIsNotNone(_a       )






def    __UpperCAmelCase (	__a      :			str	)			->     int:

					"""simple docstring"""

					assert column_title.isupper()
					_a	:    Optional[Any]         =		0
					_a	:    List[Any]         =		len(__a	) - 1
					_a	:    List[str]         =		0

					while index >= 0:
										_a	:    Dict         =		(ord(column_title[index]	) - 64) * pow(26		,__a	)
										answer += value
										power += 1
										index -= 1

					return answer


if __name__ == "__main__":
			from doctest import testmod

			testmod()



