


'''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 center_crop, 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, is_vision_available, logging


if is_vision_available():
	import PIL


_lowercase			:			Any	   =     logging.get_logger(__name__)






class        UpperCamelCase__(   lowerCAmelCase__       ):
				__magic_name__				:      Dict  		=       ["pixel_values"]




				def __init__(		self			: List[str]      ,    lowerCAmelCase			: List[str] = True      ,    lowerCAmelCase			: List[str] = None      ,    lowerCAmelCase			: Optional[Any] = PIL.Image.NEAREST      ,    lowerCAmelCase			: int = False      ,    lowerCAmelCase			: List[str] = None      ,    lowerCAmelCase			: int = 1 / 255      ,    lowerCAmelCase			: Dict = False      ,    lowerCAmelCase			: Optional[int] = True      ,    lowerCAmelCase			: List[Any] = True      ,    lowerCAmelCase			: Union[str, Any] = None      ,    lowerCAmelCase			: List[Any] = None      ,    lowerCAmelCase			: Dict = True      ,    **lowerCAmelCase			: Dict      ,    )->     Tuple:

										"""simple docstring"""




										super().__init__(**a__      )
										UpperCAmelCase     				=	size if size is not None else {'''height''': 346, '''width''': 346}
										UpperCAmelCase     				=	get_size_dict(a__      )
										UpperCAmelCase     				=	crop_size if crop_size is not None else {'''height''': 289, '''width''': 289}
										UpperCAmelCase     				=	get_size_dict(a__      ,    param_name='''crop_size'''      )

										UpperCAmelCase     				=	do_resize
										UpperCAmelCase     				=	size
										UpperCAmelCase     				=	resample
										UpperCAmelCase     				=	do_center_crop
										UpperCAmelCase     				=	crop_size
										UpperCAmelCase     				=	do_rescale
										UpperCAmelCase     				=	rescale_factor
										UpperCAmelCase     				=	rescale_offset
										UpperCAmelCase     				=	do_normalize
										UpperCAmelCase     				=	image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
										UpperCAmelCase     				=	image_std if image_std is not None else IMAGENET_STANDARD_STD
										UpperCAmelCase     				=	include_top




				def      a__(		self			: Any      ,    lowerCAmelCase			: List[Any]      ,    lowerCAmelCase			: int      ,    lowerCAmelCase			: str = PIL.Image.NEAREST      ,    lowerCAmelCase			: Dict = None      ,    **lowerCAmelCase			: str      ,    )->     List[Any]:

										"""simple docstring"""




										UpperCAmelCase     				=	get_size_dict(a__      )
										if "height" not in size or "width" not in size:
																raise ValueError(F"""The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}"""      )
										return resize(
										    a__      ,    size=(size['''height'''], size['''width'''])      ,    resample=a__      ,    data_format=a__      ,    **a__      )




				def      a__(		self			: int      ,    lowerCAmelCase			: List[Any]      ,    lowerCAmelCase			: int      ,    lowerCAmelCase			: List[Any] = None      ,    **lowerCAmelCase			: Optional[int]      ,    )->     Any:

										"""simple docstring"""




										UpperCAmelCase     				=	get_size_dict(a__      )
										if "height" not in size or "width" not in size:
																raise ValueError(F"""The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}"""      )
										return center_crop(a__      ,    size=(size['''height'''], size['''width'''])      ,    data_format=a__      ,    **a__      )




				def      a__(		self			: Dict      ,    lowerCAmelCase			: Any      ,    lowerCAmelCase			: Dict      ,    lowerCAmelCase			: List[Any] = True      ,    lowerCAmelCase			: Dict = None      ,    **lowerCAmelCase			: Optional[Any]      ,    )->     Optional[Any]:

										"""simple docstring"""




										if offset:
																UpperCAmelCase     				=	(image - 127.5) * scale
																if data_format is not None:
																						UpperCAmelCase     				=	to_channel_dimension_format(a__      ,    a__      )
																UpperCAmelCase     				=	rescaled_image.astype(np.floataa      )
										else:
																UpperCAmelCase     				=	rescale(a__      ,    scale=a__      ,    data_format=a__      ,    **a__      )
										return rescaled_image




				def      a__(		self			: List[Any]      ,    lowerCAmelCase			: Optional[int]      ,    lowerCAmelCase			: Tuple      ,    lowerCAmelCase			: Union[str, Any]      ,    lowerCAmelCase			: int = None      ,    **lowerCAmelCase			: str      ,    )->     int:

										"""simple docstring"""




										return normalize(a__      ,    mean=a__      ,    std=a__      ,    data_format=a__      ,    **a__      )





				def      a__(		self			: List[str]      ,    lowerCAmelCase			: Optional[Any]      ,    lowerCAmelCase			: str = None      ,    lowerCAmelCase			: Optional[Any] = None      ,    lowerCAmelCase			: List[Any]=None      ,    lowerCAmelCase			: Dict = None      ,    lowerCAmelCase			: Any = None      ,    lowerCAmelCase			: Dict = None      ,    lowerCAmelCase			: Optional[Any] = None      ,    lowerCAmelCase			: Tuple = None      ,    lowerCAmelCase			: Tuple = None      ,    lowerCAmelCase			: Any = None      ,    lowerCAmelCase			: Tuple = None      ,    lowerCAmelCase			: Tuple = None      ,    lowerCAmelCase			: Tuple = None      ,    lowerCAmelCase			: Tuple = ChannelDimension.FIRST      ,    **lowerCAmelCase			: str      ,    )->     Tuple:

										"""simple docstring"""




										UpperCAmelCase     				=	do_resize if do_resize is not None else self.do_resize
										UpperCAmelCase     				=	resample if resample is not None else self.resample
										UpperCAmelCase     				=	do_center_crop if do_center_crop is not None else self.do_center_crop
										UpperCAmelCase     				=	do_rescale if do_rescale is not None else self.do_rescale
										UpperCAmelCase     				=	rescale_factor if rescale_factor is not None else self.rescale_factor
										UpperCAmelCase     				=	rescale_offset if rescale_offset is not None else self.rescale_offset
										UpperCAmelCase     				=	do_normalize if do_normalize is not None else self.do_normalize
										UpperCAmelCase     				=	image_mean if image_mean is not None else self.image_mean
										UpperCAmelCase     				=	image_std if image_std is not None else self.image_std
										UpperCAmelCase     				=	include_top if include_top is not None else self.include_top

										UpperCAmelCase     				=	size if size is not None else self.size
										UpperCAmelCase     				=	get_size_dict(a__      )
										UpperCAmelCase     				=	crop_size if crop_size is not None else self.crop_size
										UpperCAmelCase     				=	get_size_dict(a__      ,    param_name='''crop_size'''      )

										UpperCAmelCase     				=	make_list_of_images(a__      )

										if not valid_images(a__      ):
																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 or resample is None:
																raise ValueError('''Size and resample must be specified if do_resize is True.'''      )

										if do_center_crop and crop_size is None:
																raise ValueError('''Crop size must be specified if do_center_crop is True.'''      )

										if do_rescale and rescale_factor is None:
																raise ValueError('''Rescale factor must be specified if do_rescale is True.'''      )

										if do_normalize and (image_mean is None or image_std is None):
																raise ValueError('''Image mean and std must be specified if do_normalize is True.'''      )

										# All transformations expect numpy arrays.
										UpperCAmelCase     				=	[to_numpy_array(a__      ) for image in images]

										if do_resize:
																UpperCAmelCase     				=	[self.resize(image=a__      ,    size=a__      ,    resample=a__      ) for image in images]

										if do_center_crop:
																UpperCAmelCase     				=	[self.center_crop(image=a__      ,    size=a__      ) for image in images]

										if do_rescale:
																UpperCAmelCase     				=	[self.rescale(image=a__      ,    scale=a__      ,    offset=a__      ) for image in images]

										if do_normalize:
																UpperCAmelCase     				=	[self.normalize(image=a__      ,    mean=a__      ,    std=a__      ) for image in images]

										if include_top:
																UpperCAmelCase     				=	[self.normalize(image=a__      ,    mean=[0, 0, 0]      ,    std=a__      ) for image in images]

										UpperCAmelCase     				=	[to_channel_dimension_format(a__      ,    a__      ) for image in images]

										UpperCAmelCase     				=	{'''pixel_values''': images}
										return BatchFeature(data=a__      ,    tensor_type=a__      )












"""simple docstring"""


def SCREAMING_SNAKE_CASE_   (       )->		Tuple:
       _lowerCamelCase    	=					1

       while True:
              if (
                  sorted(str(snake_case		)		)
                  == sorted(str(2 * i		)		)
                  == sorted(str(3 * i		)		)
                  == sorted(str(4 * i		)		)
                  == sorted(str(5 * i		)		)
                  == sorted(str(6 * i		)		)
              ):
                     return i

              i += 1


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






