




from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding

class   __a(					_a       ):






    """simple docstring"""





    lowerCAmelCase        =				['''image_processor''', '''tokenizer''']
    lowerCAmelCase        =				'''AutoImageProcessor'''
    lowerCAmelCase        =				'''AutoTokenizer'''





    def __init__(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		Optional[Any]:
         super().__init__(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )
         UpperCAmelCase_      :							Optional[Any]       =      self.image_processor





    def __call__(				self       ,_SCREAMING_SNAKE_CASE=None       ,_SCREAMING_SNAKE_CASE=None       ,_SCREAMING_SNAKE_CASE=None       ,**_SCREAMING_SNAKE_CASE  )			->		Dict:

         if text is None and images is None:
              raise ValueError('''You have to specify either text or images. Both cannot be none.'''  )

         if text is not None:
              UpperCAmelCase_      :							Optional[int]       =      self.tokenizer(_SCREAMING_SNAKE_CASE       ,return_tensors=_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )

         if images is not None:
              UpperCAmelCase_      :							int       =      self.image_processor(_SCREAMING_SNAKE_CASE       ,return_tensors=_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )

         if text is not None and images is not None:
              UpperCAmelCase_      :							Any       =      image_features.pixel_values
              return encoding
         elif text is not None:
              return encoding
         else:
              return BatchEncoding(data=dict(**_SCREAMING_SNAKE_CASE  )       ,tensor_type=_SCREAMING_SNAKE_CASE  )





    def 							a__				(				self       ,*_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )			->		List[str]:
         return self.tokenizer.batch_decode(*_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )





    def 							a__				(				self       ,*_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )			->		Union[str, Any]:
         return self.tokenizer.decode(*_SCREAMING_SNAKE_CASE       ,**_SCREAMING_SNAKE_CASE  )





    @property
    def 							a__				(				self  )			->		List[str]:
         return ["input_ids", "attention_mask", "pixel_values"]





from __future__ import annotations

from fractions import Fraction







def lowerCamelCase__       (      _lowercase			,						_lowercase				):

     '''simple docstring'''


     return (
         num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
     )







def lowerCamelCase__       (      _lowercase				):

     '''simple docstring'''


     UpperCAmelCase_      :							Optional[int]       =      []
     UpperCAmelCase_      :							Tuple       =      11
     UpperCAmelCase_      :							int       =      int('''1''' + '''0''' * digit_len				)
     for num in range(_lowercase			,						_lowercase				):
          while den <= 99:
               if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
                    if is_digit_cancelling(_lowercase			,						_lowercase				):
                         solutions.append(f'''{num}/{den}'''				)
               den += 1
          num += 1
          UpperCAmelCase_      :							Any       =      10
     return solutions







def lowerCamelCase__       (      _lowercase = 2				):

     '''simple docstring'''


     UpperCAmelCase_      :							Tuple       =      1.0
     for fraction in fraction_list(_lowercase				):
          UpperCAmelCase_      :							Optional[Any]       =      Fraction(_lowercase				)
          result *= frac.denominator / frac.numerator
     return int(_lowercase				)


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