
"""simple docstring"""







import json
import os
import tempfile

from transformers.testing_utils import check_json_file_has_correct_format




class 			A__	:
		A_						:	int           =     None

		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						List[Any]						      =				self.feature_extraction_class(**self.feat_extract_dict			)
			__lowerCAmelCase      :						Dict						      =				json.loads(feat_extract.to_json_string()			)
			for key, value in self.feat_extract_dict.items():
				self.assertEqual(obj[key]	,		_SCREAMING_SNAKE_CASE			)

		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						Dict						      =				self.feature_extraction_class(**self.feat_extract_dict			)

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

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

		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						List[str]						      =				self.feature_extraction_class(**self.feat_extract_dict			)

			with tempfile.TemporaryDirectory() as tmpdirname:
				__lowerCAmelCase      :						Any						      =				feat_extract_first.save_pretrained(_SCREAMING_SNAKE_CASE			)[0]
				check_json_file_has_correct_format(_SCREAMING_SNAKE_CASE			)
				__lowerCAmelCase      :						Union[str, Any]						      =				self.feature_extraction_class.from_pretrained(_SCREAMING_SNAKE_CASE			)

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







		def 							__lowerCamelCase							(				self			):
			__lowerCAmelCase      :						str						      =				self.feature_extraction_class()
			self.assertIsNotNone(_SCREAMING_SNAKE_CASE			)

"""simple docstring"""







import warnings
from functools import wraps
from typing import Callable
def    __lowerCAmelCase    (_UpperCamelCase		):

	@wraps(_UpperCamelCase		)
	def _inner_fn(*_UpperCamelCase	,  **_UpperCamelCase		):
		warnings.warn(
		    (F"'{fn.__name__}' is experimental and might be subject to breaking changes in the future.")	,  _UpperCamelCase	,  )
		return fn(*_UpperCamelCase	,  **_UpperCamelCase		)

	return _inner_fn