





'''simple docstring'''




from collections.abc import Callable

import numpy as np






def 	_lowerCAmelCase      (  __snake_case  :			Callable			,							__snake_case  :			float			,							__snake_case  :			float			,							__snake_case  :			float			,							__snake_case  :			float      )					->					np.array:






     """simple docstring"""




     __A						:			List[str]								=	int(np.ceil((x_end - xa) / step_size      )      )
     __A						:			Dict								=	np.zeros((n + 1,)      )
     __A						:			List[Any]								=	ya
     __A						:			List[Any]								=	xa

     for k in range(__snake_case      ):
          __A						:			Optional[Any]								=	y[k] + step_size * ode_func(__snake_case			,							y[k]      )
          __A						:			Optional[int]								=	y[k] + (
              (step_size / 2) * (ode_func(__snake_case			,							y[k]      ) + ode_func(x + step_size			,							__snake_case      ))
          )
          x += step_size

     return y


if __name__ == "__main__":
  import doctest

  doctest.testmod()






'''simple docstring'''




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


class 			SCREAMING_SNAKE_CASE   (a__							):
     lowerCAmelCase		      =	['''image_processor''', '''tokenizer''']
     lowerCAmelCase		      =	'''AutoImageProcessor'''
     lowerCAmelCase		      =	'''AutoTokenizer'''


     def __init__(						self						,     _UpperCAmelCase						,     _UpperCAmelCase):

          '''simple docstring'''






          super().__init__(_UpperCAmelCase						,     _UpperCAmelCase)
          __A						:			Tuple								=	self.image_processor


     def __call__(						self						,     _UpperCAmelCase=None						,     _UpperCAmelCase=None						,     _UpperCAmelCase=None						,     **_UpperCAmelCase):

          '''simple docstring'''






          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:
               __A						:			Any								=	self.tokenizer(_UpperCAmelCase						,     return_tensors=_UpperCAmelCase						,     **_UpperCAmelCase)

          if images is not None:
               __A						:			Tuple								=	self.image_processor(_UpperCAmelCase						,     return_tensors=_UpperCAmelCase						,     **_UpperCAmelCase)

          if text is not None and images is not None:
               __A						:			Optional[int]								=	image_features.pixel_values
               return encoding
          elif text is not None:
               return encoding
          else:
               return BatchEncoding(data=dict(**_UpperCAmelCase)						,     tensor_type=_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self						,     *_UpperCAmelCase						,     **_UpperCAmelCase):

          '''simple docstring'''






          return self.tokenizer.batch_decode(*_UpperCAmelCase						,     **_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self						,     *_UpperCAmelCase						,     **_UpperCAmelCase):

          '''simple docstring'''






          return self.tokenizer.decode(*_UpperCAmelCase						,     **_UpperCAmelCase)


     @property
     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          return ["input_ids", "attention_mask", "pixel_values"]