
'''simple docstring'''






from typing import List, Optional, Union

import numpy as np
import PIL.Image

from ...image_processing_utils import BaseImageProcessor, BatchFeature
from ...image_transforms import rescale, resize, to_channel_dimension_format
from ...image_utils import (
    ChannelDimension,
    PILImageResampling,
    get_image_size,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, logging


A			      =      logging.get_logger(__name__)




class     __snake_case		(   a__):
					_lowerCAmelCase			     =	['''pixel_values''']
					def __init__(     self,    A = True,    A = 32,    A=PILImageResampling.BILINEAR,    A = True,    **A,    ):

									"""simple docstring"""


									lowerCamelCase					:			Tuple									= do_resize
									lowerCamelCase					:			int									= do_rescale
									lowerCamelCase					:			str									= size_divisor
									lowerCamelCase					:			Tuple									= resample
									super().__init__(**A      )
					def     UpperCAmelCase_							(     self,    A,    A,    A,    A = None,    **A      ):

									"""simple docstring"""


									lowerCamelCase					:			Optional[Any]									= get_image_size(A      )
									# Rounds the height and width down to the closest multiple of size_divisor
									lowerCamelCase					:			List[str]									= height // size_divisor * size_divisor
									lowerCamelCase					:			List[Any]									= width // size_divisor * size_divisor
									lowerCamelCase					:			str									= resize(A,    (new_h, new_w),    resample=A,    data_format=A,    **A      )
									return image
					def     UpperCAmelCase_							(     self,    A,    A,    A = None,    **A      ):

									"""simple docstring"""


									return rescale(image=A,    scale=A,    data_format=A,    **A      )




					def     UpperCAmelCase_							(     self,    A,    A = None,    A = None,    A=None,    A = None,    A = None,    A = ChannelDimension.FIRST,    **A,    ):

									"""simple docstring"""


									lowerCamelCase					:			Union[str, Any]									= do_resize if do_resize is not None else self.do_resize
									lowerCamelCase					:			Optional[int]									= do_rescale if do_rescale is not None else self.do_rescale
									lowerCamelCase					:			Optional[Any]									= size_divisor if size_divisor is not None else self.size_divisor
									lowerCamelCase					:			Tuple									= resample if resample is not None else self.resample

									if do_resize and size_divisor is None:
													raise ValueError('size_divisor is required for resizing'      )

									lowerCamelCase					:			Union[str, Any]									= make_list_of_images(A      )

									if not valid_images(A      ):
													raise ValueError('Invalid image(s)'      )

									# All transformations expect numpy arrays.
									lowerCamelCase					:			Dict									= [to_numpy_array(A      ) for img in images]

									if do_resize:
													lowerCamelCase					:			Optional[int]									= [self.resize(A,    size_divisor=A,    resample=A      ) for image in images]

									if do_rescale:
													lowerCamelCase					:			Optional[int]									= [self.rescale(A,    scale=1 / 255      ) for image in images]

									lowerCamelCase					:			Optional[int]									= [to_channel_dimension_format(A,    A      ) for image in images]

									lowerCamelCase					:			List[str]									= {'pixel_values': images}
									return BatchFeature(data=A,    tensor_type=A      )







'''simple docstring'''






def    UpperCAmelCase							(  UpperCAmelCase__							:							int = 10_00):
				lowerCamelCase					:			Optional[Any]									= 2**power
				lowerCamelCase					:			str									= str(UpperCAmelCase__)
				lowerCamelCase					:			Union[str, Any]									= list(UpperCAmelCase__)
				lowerCamelCase					:			Optional[Any]									= 0

				for i in list_num:
								sum_of_num += int(UpperCAmelCase__)

				return sum_of_num


if __name__ == "__main__":
					A			      =      int(input('Enter the power of 2: ').strip())
					print('2 ^ ', power, ' = ', 2**power)
					A			      =      solution(power)
					print('Sum of the digits is: ', result)
