





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,
    convert_to_rgb,
    get_resize_output_image_size,
    normalize,
    rescale,
    resize,
    to_channel_dimension_format,
)
from ...image_utils import (
    OPENAI_CLIP_MEAN,
    OPENAI_CLIP_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


UpperCAmelCase      :      Tuple							=			logging.get_logger(__name__)


if is_vision_available():
     import PIL







class 							__lowerCAmelCase			(       _UpperCamelCase):
      _lowercase							:   Optional[Any]          =     ['pixel_values']







      def __init__(       self						, lowerCAmelCase__ = True						, lowerCAmelCase__ = None						, lowerCAmelCase__ = PILImageResampling.BICUBIC						, lowerCAmelCase__ = True						, lowerCAmelCase__ = None						, lowerCAmelCase__ = True						, lowerCAmelCase__ = 1 / 2_5_5						, lowerCAmelCase__ = True						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = True						, **lowerCAmelCase__						, )  ->		Optional[Any]:



        '''simple docstring'''




        super().__init__(**_UpperCAmelCase				)
        a__      :   Optional[int]      =size if size is not None else {'shortest_edge': 2_2_4}
        a__      :   Dict      =get_size_dict(_UpperCAmelCase						, default_to_square=_UpperCAmelCase				)
        a__      :   str      =crop_size if crop_size is not None else {'height': 2_2_4, 'width': 2_2_4}
        a__      :   Tuple      =get_size_dict(_UpperCAmelCase						, default_to_square=_UpperCAmelCase						, param_name="crop_size"				)

        a__      :   Optional[int]      =do_resize
        a__      :   Any      =size
        a__      :   Union[str, Any]      =resample
        a__      :   Optional[int]      =do_center_crop
        a__      :   Dict      =crop_size
        a__      :   Optional[Any]      =do_rescale
        a__      :   Any      =rescale_factor
        a__      :   Any      =do_normalize
        a__      :   List[str]      =image_mean if image_mean is not None else OPENAI_CLIP_MEAN
        a__      :   Dict      =image_std if image_std is not None else OPENAI_CLIP_STD
        a__      :   List[Any]      =do_convert_rgb







      def   _lowercase    (       self						, lowerCAmelCase__						, lowerCAmelCase__						, lowerCAmelCase__ = PILImageResampling.BICUBIC						, lowerCAmelCase__ = None						, **lowerCAmelCase__						, )  ->		Optional[int]:



        '''simple docstring'''




        a__      :   Dict      =get_size_dict(_UpperCAmelCase						, default_to_square=_UpperCAmelCase				)
        if "shortest_edge" not in size:
          raise ValueError(F'''The `size` parameter must contain the key `shortest_edge`. Got {size.keys()}'''				)
        a__      :   List[Any]      =get_resize_output_image_size(_UpperCAmelCase						, size=size["shortest_edge"]						, default_to_square=_UpperCAmelCase				)
        return resize(_UpperCAmelCase						, size=_UpperCAmelCase						, resample=_UpperCAmelCase						, data_format=_UpperCAmelCase						, **_UpperCAmelCase				)







      def   _lowercase    (       self						, lowerCAmelCase__						, lowerCAmelCase__						, lowerCAmelCase__ = None						, **lowerCAmelCase__						, )  ->		List[str]:



        '''simple docstring'''




        a__      :   str      =get_size_dict(_UpperCAmelCase				)
        if "height" not in size or "width" not in size:
          raise ValueError(F'''The `size` parameter must contain the keys (height, width). Got {size.keys()}'''				)
        return center_crop(_UpperCAmelCase						, size=(size["height"], size["width"])						, data_format=_UpperCAmelCase						, **_UpperCAmelCase				)







      def   _lowercase    (       self						, lowerCAmelCase__						, lowerCAmelCase__						, lowerCAmelCase__ = None						, **lowerCAmelCase__						, )  ->		int:



        '''simple docstring'''




        return rescale(_UpperCAmelCase						, scale=_UpperCAmelCase						, data_format=_UpperCAmelCase						, **_UpperCAmelCase				)







      def   _lowercase    (       self						, lowerCAmelCase__						, lowerCAmelCase__						, lowerCAmelCase__						, lowerCAmelCase__ = None						, **lowerCAmelCase__						, )  ->		Optional[Any]:



        '''simple docstring'''




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







      def   _lowercase    (       self						, lowerCAmelCase__						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = None						, lowerCAmelCase__ = ChannelDimension.FIRST						, **lowerCAmelCase__						, )  ->		Optional[Any]:



        '''simple docstring'''




        a__      :   Optional[Any]      =do_resize if do_resize is not None else self.do_resize
        a__      :   Any      =size if size is not None else self.size
        a__      :   Tuple      =get_size_dict(_UpperCAmelCase						, param_name="size"						, default_to_square=_UpperCAmelCase				)
        a__      :   str      =resample if resample is not None else self.resample
        a__      :   List[Any]      =do_center_crop if do_center_crop is not None else self.do_center_crop
        a__      :   Optional[int]      =crop_size if crop_size is not None else self.crop_size
        a__      :   Any      =get_size_dict(_UpperCAmelCase						, param_name="crop_size"						, default_to_square=_UpperCAmelCase				)
        a__      :   Union[str, Any]      =do_rescale if do_rescale is not None else self.do_rescale
        a__      :   List[str]      =rescale_factor if rescale_factor is not None else self.rescale_factor
        a__      :   Any      =do_normalize if do_normalize is not None else self.do_normalize
        a__      :   Any      =image_mean if image_mean is not None else self.image_mean
        a__      :   int      =image_std if image_std is not None else self.image_std
        a__      :   List[str]      =do_convert_rgb if do_convert_rgb is not None else self.do_convert_rgb

        a__      :   Tuple      =make_list_of_images(_UpperCAmelCase				)

        if not valid_images(_UpperCAmelCase				):
          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_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."				)

        # PIL RGBA images are converted to RGB
        if do_convert_rgb:
          a__      :   List[str]      =[convert_to_rgb(_UpperCAmelCase				) for image in images]

        # All transformations expect numpy arrays.
        a__      :   List[Any]      =[to_numpy_array(_UpperCAmelCase				) for image in images]

        if do_resize:
          a__      :   Union[str, Any]      =[self.resize(image=_UpperCAmelCase						, size=_UpperCAmelCase						, resample=_UpperCAmelCase				) for image in images]

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

        if do_rescale:
          a__      :   Optional[int]      =[self.rescale(image=_UpperCAmelCase						, scale=_UpperCAmelCase				) for image in images]

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

        a__      :   Union[str, Any]      =[to_channel_dimension_format(_UpperCAmelCase						, _UpperCAmelCase				) for image in images]

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











'''simple docstring'''

def 	__lowerCamelCase	( )     -> Union[str, Any]:
		_a	: Optional[Any]								=				[]
		_a	: List[str]								=				1

		while len(lowerCAmelCase_    ) < 1E6:
				constant.append(str(lowerCAmelCase_    )    )
				i += 1

		_a	: Optional[Any]								=				''.join(lowerCAmelCase_    )

		return (
		    int(constant[0]    )
		    * int(constant[9]    )
		    * int(constant[99]    )
		    * int(constant[999]    )
		    * int(constant[9999]    )
		    * int(constant[99999]    )
		    * int(constant[999999]    )
		)


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




