code: 
  '''simple docstring'''
  from typing import Dict, List, Optional, Union
  
  import numpy as np
  
  from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  from ...image_transforms import normalize, rescale, resize, to_channel_dimension_format
  from ...image_utils import (
      IMAGENET_STANDARD_MEAN,
      IMAGENET_STANDARD_STD,
      ChannelDimension,
      ImageInput,
      PILImageResampling,
      make_list_of_images,
      to_numpy_array,
      valid_images,
  )
  from ...utils import TensorType, logging
  
  
  lowercase__						=			logging.get_logger(__name__)
  
  
  
  
  
  
  class   snake_case__					(			snake_case__				):
  
  
  
  
  
  
  
  		"""simple docstring"""
  
  		lowerCamelCase           =	["""pixel_values"""]
  
  
  
  		def __init__(			self							: List[str]     ,  UpperCamelCase__							: str = True     ,  UpperCamelCase__							: str = None     ,  UpperCamelCase__							: List[Any] = PILImageResampling.BILINEAR     ,  UpperCamelCase__							: Any = True     ,  UpperCamelCase__							: Dict = 1 / 255     ,  UpperCamelCase__							: str = True     ,  UpperCamelCase__							: Tuple = None     ,  UpperCamelCase__							: Optional[int] = None     ,  **UpperCamelCase__							: Dict     ,  )	-> Any:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				super().__init__(**__snake_case			)
  				snake_case     :					int     =	size if size is not None else {'''height''': 224, '''width''': 224}
  				snake_case     :					List[Any]     =	get_size_dict(__snake_case			)
  				snake_case     :					Optional[Any]     =	do_resize
  				snake_case     :					List[Any]     =	do_rescale
  				snake_case     :					Optional[int]     =	do_normalize
  				snake_case     :					Optional[Any]     =	size
  				snake_case     :					Union[str, Any]     =	resample
  				snake_case     :					str     =	rescale_factor
  				snake_case     :					str     =	image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
  				snake_case     :					int     =	image_std if image_std is not None else IMAGENET_STANDARD_STD
  
  
  
  		def 			lowerCAmelCase							(			self							: Dict     ,  UpperCamelCase__							: Optional[int]     ,  UpperCamelCase__							: Union[str, Any]     ,  UpperCamelCase__							: Any = PILImageResampling.BILINEAR     ,  UpperCamelCase__							: str = None     ,  **UpperCamelCase__							: int     ,  )	-> Tuple:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					Optional[Any]     =	get_size_dict(__snake_case			)
  				if "height" not in size or "width" not in size:
  						raise ValueError(f'The `size` dictionary must contain the keys `height` and `width`. Got {size.keys()}'			)
  				return resize(
  				    __snake_case     ,  size=(size['''height'''], size['''width'''])     ,  resample=__snake_case     ,  data_format=__snake_case     ,  **__snake_case			)
  
  
  
  		def 			lowerCAmelCase							(			self							: str     ,  UpperCamelCase__							: Any     ,  UpperCamelCase__							: List[Any]     ,  UpperCamelCase__							: str = None     ,  **UpperCamelCase__							: Union[str, Any]			)	-> Tuple:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				return rescale(__snake_case     ,  scale=__snake_case     ,  data_format=__snake_case     ,  **__snake_case			)
  
  
  
  		def 			lowerCAmelCase							(			self							: Tuple     ,  UpperCamelCase__							: Dict     ,  UpperCamelCase__							: Optional[Any]     ,  UpperCamelCase__							: Optional[Any]     ,  UpperCamelCase__							: List[Any] = None     ,  **UpperCamelCase__							: List[str]     ,  )	-> Optional[Any]:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				return normalize(__snake_case     ,  mean=__snake_case     ,  std=__snake_case     ,  data_format=__snake_case     ,  **__snake_case			)
  
  
  
  		def 			lowerCAmelCase							(			self							: Union[str, Any]     ,  UpperCamelCase__							: List[str]     ,  UpperCamelCase__							: Tuple = None     ,  UpperCamelCase__							: str = None     ,  UpperCamelCase__							: Optional[int] = None     ,  UpperCamelCase__							: List[Any] = None     ,  UpperCamelCase__							: Dict = None     ,  UpperCamelCase__							: Optional[Any] = None     ,  UpperCamelCase__							: Union[str, Any] = None     ,  UpperCamelCase__							: Optional[Any] = None     ,  UpperCamelCase__							: Any = None     ,  UpperCamelCase__							: List[Any] = ChannelDimension.FIRST     ,  **UpperCamelCase__							: Dict     ,  )	-> Optional[Any]:
  
  
  
  
  
  
  				"""simple docstring"""
  
  
  
  
  
  
  
  				snake_case     :					str     =	do_resize if do_resize is not None else self.do_resize
  				snake_case     :					str     =	do_rescale if do_rescale is not None else self.do_rescale
  				snake_case     :					Tuple     =	do_normalize if do_normalize is not None else self.do_normalize
  				snake_case     :					Tuple     =	resample if resample is not None else self.resample
  				snake_case     :					Dict     =	rescale_factor if rescale_factor is not None else self.rescale_factor
  				snake_case     :					List[Any]     =	image_mean if image_mean is not None else self.image_mean
  				snake_case     :					str     =	image_std if image_std is not None else self.image_std
  
  				snake_case     :					List[str]     =	size if size is not None else self.size
  				snake_case     :					Dict     =	get_size_dict(__snake_case			)
  
  				snake_case     :					Any     =	make_list_of_images(__snake_case			)
  
  				if not valid_images(__snake_case			):
  						raise ValueError(
  						    '''Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, '''
  						    '''torch.Tensor, tf.Tensor or jax.ndarray.'''			)
  
  				if do_resize and size is None:
  						raise ValueError('''Size must be specified if do_resize is True.'''			)
  
  				if do_rescale and rescale_factor is None:
  						raise ValueError('''Rescale factor must be specified if do_rescale is True.'''			)
  
  				# All transformations expect numpy arrays.
  				snake_case     :					Optional[int]     =	[to_numpy_array(__snake_case			) for image in images]
  
  				if do_resize:
  						snake_case     :					Tuple     =	[self.resize(image=__snake_case     ,  size=__snake_case     ,  resample=__snake_case			) for image in images]
  
  				if do_rescale:
  						snake_case     :					Union[str, Any]     =	[self.rescale(image=__snake_case     ,  scale=__snake_case			) for image in images]
  
  				if do_normalize:
  						snake_case     :					Optional[Any]     =	[self.normalize(image=__snake_case     ,  mean=__snake_case     ,  std=__snake_case			) for image in images]
  
  				snake_case     :					Tuple     =	[to_channel_dimension_format(__snake_case     ,  __snake_case			) for image in images]
  
  				snake_case     :					str     =	{'''pixel_values''': images}
  				return BatchFeature(data=__snake_case     ,  tensor_type=__snake_case			)
  
  
  
style_context: 
  '''simple docstring'''
  def       _UpperCamelCase	(					)     ->       int:
  
  
  		'''simple docstring'''
  
  
  		for a in range(300 ):
  				for b in range(a + 1   ,					400 ):
  						for c in range(b + 1   ,					500 ):
  								if (a + b + c) == 1000 and (a**2) + (b**2) == (c**2):
  										return a * b * c
  
  		return -1
  
  
  
  
  def       _UpperCamelCase	(					)     ->       int:
  
  
  		'''simple docstring'''
  
  
  		for a in range(300 ):
  				for b in range(400 ):
  						snake_case     :					Dict     =	1000 - a - b
  						if a < b < c and (a**2) + (b**2) == (c**2):
  								return a * b * c
  
  		return -1
  
  
  
  
  def       _UpperCamelCase	(					)     ->       None:
  
  
  		'''simple docstring'''
  
  
  		import timeit
  
  		print(
  		    timeit.timeit('''solution()'''   ,					setup='''from __main__ import solution'''   ,					number=1000 ) )
  		print(
  		    timeit.timeit(
  		        '''solution_fast()'''   ,					setup='''from __main__ import solution_fast'''   ,					number=1000 ) )
  
  
  if __name__ == "__main__":
  						print(f"{solution() = }")
  
  
  