"""simple docstring"""







def 	a__   (		UpperCAmelCase__							:      str		,      UpperCAmelCase__							:      Any = 2      )->						List[str]:
						return round((float(_a      ) * 9 / 5) + 3_2		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Optional[int]		,      UpperCAmelCase__							:      Any = 2      )->						Dict:
						return round(float(_a      ) + 2_73.15		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Tuple		,      UpperCAmelCase__							:      Dict = 2      )->						List[Any]:
						return round((float(_a      ) * 9 / 5) + 4_91.67		,      _a      )


def 	a__   (		UpperCAmelCase__							:      List[Any]		,      UpperCAmelCase__							:      Any = 2      )->						List[Any]:
						return round((float(_a      ) - 3_2) * 5 / 9		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Union[str, Any]		,      UpperCAmelCase__							:      Dict = 2      )->						Union[str, Any]:
						return round(((float(_a      ) - 3_2) * 5 / 9) + 2_73.15		,      _a      )


def 	a__   (		UpperCAmelCase__							:      str		,      UpperCAmelCase__							:      Optional[int] = 2      )->						Dict:
						return round(float(_a      ) + 4_59.67		,      _a      )


def 	a__   (		UpperCAmelCase__							:      int		,      UpperCAmelCase__							:      List[str] = 2      )->						Union[str, Any]:
						return round(float(_a      ) - 2_73.15		,      _a      )


def 	a__   (		UpperCAmelCase__							:      int		,      UpperCAmelCase__							:      Optional[int] = 2      )->						List[Any]:
						return round(((float(_a      ) - 2_73.15) * 9 / 5) + 3_2		,      _a      )


def 	a__   (		UpperCAmelCase__							:      str		,      UpperCAmelCase__							:      Dict = 2      )->						Tuple:
						return round((float(_a      ) * 9 / 5)		,      _a      )


def 	a__   (		UpperCAmelCase__							:      List[str]		,      UpperCAmelCase__							:      Optional[int] = 2      )->						List[str]:
						return round((float(_a      ) - 4_91.67) * 5 / 9		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Dict		,      UpperCAmelCase__							:      int = 2      )->						Dict:
						return round(float(_a      ) - 4_59.67		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Optional[int]		,      UpperCAmelCase__							:      Tuple = 2      )->						Optional[int]:
						return round((float(_a      ) * 5 / 9)		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Union[str, Any]		,      UpperCAmelCase__							:      Tuple = 2      )->						int:
						return round((float(_a      ) * 1.25 + 2_73.15)		,      _a      )


def 	a__   (		UpperCAmelCase__							:      int		,      UpperCAmelCase__							:      List[str] = 2      )->						List[str]:
						return round((float(_a      ) * 2.25 + 3_2)		,      _a      )


def 	a__   (		UpperCAmelCase__							:      List[str]		,      UpperCAmelCase__							:      List[Any] = 2      )->						Union[str, Any]:
						return round((float(_a      ) * 1.25)		,      _a      )


def 	a__   (		UpperCAmelCase__							:      Tuple		,      UpperCAmelCase__							:      str = 2      )->						Any:
						return round((float(_a      ) * 2.25 + 3_2 + 4_59.67)		,      _a      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin

class 		__magic_name__				( lowercase_					):


  """simple docstring"""





  _UpperCamelCase						 = ["image_processor", "tokenizer"]
  _UpperCamelCase						 = "AutoImageProcessor"
  _UpperCamelCase						 = "AutoTokenizer"


  def __init__(					self	,		a__=None	,		a__=None	,		**a__		):
    _lowerCamelCase      =						None
    if "feature_extractor" in kwargs:
      warnings.warn(
          '''The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'''
          ''' instead.'''	,		a__	,		)
      _lowerCamelCase      =						kwargs.pop('''feature_extractor'''		)

    _lowerCamelCase      =						image_processor if image_processor is not None else feature_extractor
    if image_processor is None:
      raise ValueError('''You need to specify an `image_processor`.'''		)
    if tokenizer is None:
      raise ValueError('''You need to specify a `tokenizer`.'''		)

    super().__init__(a__	,		a__		)
    _lowerCamelCase      =						self.image_processor
    _lowerCamelCase      =						False


  def __call__(					self	,		*a__	,		**a__		):
    # For backward compatibility
    if self._in_target_context_manager:
      return self.current_processor(*a__	,		**a__		)

    _lowerCamelCase      =						kwargs.pop('''images'''	,		a__		)
    _lowerCamelCase      =						kwargs.pop('''text'''	,		a__		)
    if len(a__		) > 0:
      _lowerCamelCase      =						args[0]
      _lowerCamelCase      =						args[1:]

    if images is None and text is None:
      raise ValueError('''You need to specify either an `images` or `text` input to process.'''		)

    if images is not None:
      _lowerCamelCase      =						self.image_processor(a__	,		*a__	,		**a__		)
    if text is not None:
      _lowerCamelCase      =						self.tokenizer(a__	,		**a__		)

    if text is None:
      return inputs
    elif images is None:
      return encodings
    else:
      _lowerCamelCase      =						encodings['''input_ids''']
      return inputs


  def     _UpperCAmelCase  (					self	,		*a__	,		**a__		):
    return self.tokenizer.batch_decode(*a__	,		**a__		)


  def     _UpperCAmelCase  (					self	,		*a__	,		**a__		):
    return self.tokenizer.decode(*a__	,		**a__		)


  @contextmanager
  def     _UpperCAmelCase  (					self		):
    warnings.warn(
        '''`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '''
        '''labels by using the argument `text` of the regular `__call__` method (either in the same call as '''
        '''your images inputs, or in a separate call.'''		)
    _lowerCamelCase      =						True
    _lowerCamelCase      =						self.tokenizer
    yield
    _lowerCamelCase      =						self.image_processor
    _lowerCamelCase      =						False


  @property
  def     _UpperCAmelCase  (					self		):
    warnings.warn(
        '''`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'''	,		a__	,		)
    return self.image_processor_class


  @property
  def     _UpperCAmelCase  (					self		):
    warnings.warn(
        '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''	,		a__	,		)
    return self.image_processor




