






'''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,
    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


a_					=	logging.get_logger(__name__)


if is_vision_available():
     import PIL






class        __SCREAMING_SNAKE_CASE (     _SCREAMING_SNAKE_CASE			):
 snake_case_												=							["""pixel_values"""]




 def __init__( self		:							Optional[Any]   , __lowercase		:							Any = True   , __lowercase		:							Tuple = None   , __lowercase		:							List[Any] = PILImageResampling.BICUBIC   , __lowercase		:							Any = True   , __lowercase		:							str = None   , __lowercase		:							int = True   , __lowercase		:							List[str] = 1 / 2_55   , __lowercase		:							Optional[Any] = True   , __lowercase		:							Any = None   , __lowercase		:							Tuple = None   , __lowercase		:							Optional[Any] = True   , **__lowercase		:							Optional[Any]   , )		->  None:
       super().__init__(**__lowercase )
       SCREAMING_SNAKE_CASE__       :			Tuple													=size if size is not None else {'''shortest_edge''': 2_24}
       SCREAMING_SNAKE_CASE__       :			str													=get_size_dict(__lowercase   , default_to_square=__lowercase )
       SCREAMING_SNAKE_CASE__       :			str													=crop_size if crop_size is not None else {'''height''': 2_24, '''width''': 2_24}
       SCREAMING_SNAKE_CASE__       :			Any													=get_size_dict(__lowercase   , default_to_square=__lowercase   , param_name='''crop_size''' )

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




 def        __magic_name__		( self		:							Dict   , __lowercase		:							List[str]   , __lowercase		:							List[str]   , __lowercase		:							Any = PILImageResampling.BICUBIC   , __lowercase		:							Union[str, Any] = None   , **__lowercase		:							Union[str, Any]   , )		->  np.ndarray:
       SCREAMING_SNAKE_CASE__       :			int													=get_size_dict(__lowercase   , default_to_square=__lowercase )
       if "shortest_edge" not in size:
             raise ValueError(F"The `size` parameter must contain the key `shortest_edge`. Got {size.keys()}" )
       SCREAMING_SNAKE_CASE__       :			List[Any]													=get_resize_output_image_size(__lowercase   , size=size['''shortest_edge''']   , default_to_square=__lowercase )
       return resize(__lowercase   , size=__lowercase   , resample=__lowercase   , data_format=__lowercase   , **__lowercase )




 def        __magic_name__		( self		:							Any   , __lowercase		:							List[str]   , __lowercase		:							Union[str, Any]   , __lowercase		:							Any = None   , **__lowercase		:							Optional[Any]   , )		->  np.ndarray:
       SCREAMING_SNAKE_CASE__       :			Union[str, Any]													=get_size_dict(__lowercase )
       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(__lowercase   , size=(size['''height'''], size['''width'''])   , data_format=__lowercase   , **__lowercase )




 def        __magic_name__		( self		:							Tuple   , __lowercase		:							List[Any]   , __lowercase		:							Union[str, Any]   , __lowercase		:							Dict = None   , **__lowercase		:							Dict   , )		->  List[Any]:
       return rescale(__lowercase   , scale=__lowercase   , data_format=__lowercase   , **__lowercase )




 def        __magic_name__		( self		:							Dict   , __lowercase		:							Tuple   , __lowercase		:							Any   , __lowercase		:							Optional[Any]   , __lowercase		:							Union[str, Any] = None   , **__lowercase		:							Tuple   , )		->  np.ndarray:
       return normalize(__lowercase   , mean=__lowercase   , std=__lowercase   , data_format=__lowercase   , **__lowercase )




 def        __magic_name__		( self		:							Optional[int]   , __lowercase		:							Union[str, Any]   , __lowercase		:							List[str] = None   , __lowercase		:							Tuple = None   , __lowercase		:							Optional[int] = None   , __lowercase		:							List[str] = None   , __lowercase		:							Union[str, Any] = None   , __lowercase		:							Dict = None   , __lowercase		:							Union[str, Any] = None   , __lowercase		:							Tuple = None   , __lowercase		:							List[Any] = None   , __lowercase		:							Tuple = None   , __lowercase		:							List[Any] = None   , __lowercase		:							Any = None   , __lowercase		:							Any = ChannelDimension.FIRST   , **__lowercase		:							Dict   , )		->  PIL.Image.Image:
       SCREAMING_SNAKE_CASE__       :			Optional[Any]													=do_resize if do_resize is not None else self.do_resize
       SCREAMING_SNAKE_CASE__       :			int													=size if size is not None else self.size
       SCREAMING_SNAKE_CASE__       :			Any													=get_size_dict(__lowercase   , param_name='''size'''   , default_to_square=__lowercase )
       SCREAMING_SNAKE_CASE__       :			Optional[int]													=resample if resample is not None else self.resample
       SCREAMING_SNAKE_CASE__       :			Optional[Any]													=do_center_crop if do_center_crop is not None else self.do_center_crop
       SCREAMING_SNAKE_CASE__       :			Dict													=crop_size if crop_size is not None else self.crop_size
       SCREAMING_SNAKE_CASE__       :			Optional[int]													=get_size_dict(__lowercase   , param_name='''crop_size'''   , default_to_square=__lowercase )
       SCREAMING_SNAKE_CASE__       :			Dict													=do_rescale if do_rescale is not None else self.do_rescale
       SCREAMING_SNAKE_CASE__       :			Optional[int]													=rescale_factor if rescale_factor is not None else self.rescale_factor
       SCREAMING_SNAKE_CASE__       :			Any													=do_normalize if do_normalize is not None else self.do_normalize
       SCREAMING_SNAKE_CASE__       :			Union[str, Any]													=image_mean if image_mean is not None else self.image_mean
       SCREAMING_SNAKE_CASE__       :			Tuple													=image_std if image_std is not None else self.image_std
       SCREAMING_SNAKE_CASE__       :			List[str]													=do_convert_rgb if do_convert_rgb is not None else self.do_convert_rgb

       SCREAMING_SNAKE_CASE__       :			List[str]													=make_list_of_images(__lowercase )

       if not valid_images(__lowercase ):
             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:
             SCREAMING_SNAKE_CASE__       :			str													=[convert_to_rgb(__lowercase ) for image in images]

       # All transformations expect numpy arrays.
       SCREAMING_SNAKE_CASE__       :			Any													=[to_numpy_array(__lowercase ) for image in images]

       if do_resize:
             SCREAMING_SNAKE_CASE__       :			Optional[int]													=[self.resize(image=__lowercase   , size=__lowercase   , resample=__lowercase ) for image in images]

       if do_center_crop:
             SCREAMING_SNAKE_CASE__       :			Union[str, Any]													=[self.center_crop(image=__lowercase   , size=__lowercase ) for image in images]

       if do_rescale:
             SCREAMING_SNAKE_CASE__       :			List[str]													=[self.rescale(image=__lowercase   , scale=__lowercase ) for image in images]

       if do_normalize:
             SCREAMING_SNAKE_CASE__       :			str													=[self.normalize(image=__lowercase   , mean=__lowercase   , std=__lowercase ) for image in images]

       SCREAMING_SNAKE_CASE__       :			Union[str, Any]													=[to_channel_dimension_format(__lowercase   , __lowercase ) for image in images]

       SCREAMING_SNAKE_CASE__       :			Tuple													={'''pixel_values''': images}
       return BatchFeature(data=__lowercase   , tensor_type=__lowercase )







'''simple docstring'''
def 	_a(					UpperCamelCase__			:  Optional[Any]=2_8_1_2_3							):




      '''simple docstring'''






      SCREAMING_SNAKE_CASE__       :			List[Any]													=[1] * (limit + 1)

      for i in range(2,		int(limit**0.5							) + 1							):
            sum_divs[i * i] += i
            for k in range(i + 1,		limit // i + 1							):
                  sum_divs[k * i] += k + i

      SCREAMING_SNAKE_CASE__       :			List[str]													=set()
      SCREAMING_SNAKE_CASE__       :			str													=0

      for n in range(1,		limit + 1							):
            if sum_divs[n] > n:
                  abundants.add(UpperCamelCase__							)

            if not any((n - a in abundants) for a in abundants							):
                  res += n

      return res


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