






def 	__magic_name__( _A						,      _A					):
						'''simple docstring'''





						return base * power(_A						,      (exponent - 1)					) if exponent else 1


if __name__ == "__main__":
					print('''Raise base to the power of exponent using recursion...''')
					lowerCamelCase_				: List[str]    	=							int(input('''Enter the base: ''').strip())
					lowerCamelCase_				: Dict    	=							int(input('''Enter the exponent: ''').strip())
					lowerCamelCase_				: str    	=							power(base, abs(exponent))
					if exponent < 0:  # power() does not properly deal w/ negative exponents
										lowerCamelCase_				: int    	=							1 / result
					print(f"""{base} to the power of {exponent} is {result}""")








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


lowerCamelCase_				: Optional[int]    	=							logging.get_logger(__name__)
class    _SCREAMING_SNAKE_CASE							(		SCREAMING_SNAKE_CASE	):


			'''simple docstring'''





			__a							:							Optional[Any]					     =					["pixel_values"]






			def __init__(   self							:						str ,      lowercase							:						bool = True ,      lowercase							:						int = 3_2 ,      lowercase							:						List[Any]=PILImageResampling.BILINEAR ,      lowercase							:						bool = True ,      **lowercase							:						str ,      )							->    None:

									'''simple docstring'''







									UpperCamelCase__         = do_resize
									UpperCamelCase__         = do_rescale
									UpperCamelCase__         = size_divisor
									UpperCamelCase__         = resample
									super().__init__(**lowercase			)






			def 				A      (   self							:						Optional[int] ,      lowercase							:						np.ndarray ,      lowercase							:						int ,      lowercase							:						List[Any] ,      lowercase							:						Optional[ChannelDimension] = None ,      **lowercase							:						Any			)							->    np.ndarray:

									'''simple docstring'''







									UpperCamelCase__    ,   UpperCamelCase__         = get_image_size(lowercase			)
									# Rounds the height and width down to the closest multiple of size_divisor
									UpperCamelCase__         = height // size_divisor * size_divisor
									UpperCamelCase__         = width // size_divisor * size_divisor
									UpperCamelCase__         = resize(lowercase ,      (new_h, new_w) ,      resample=lowercase ,      data_format=lowercase ,      **lowercase			)
									return image






			def 				A      (   self							:						int ,      lowercase							:						np.ndarray ,      lowercase							:						float ,      lowercase							:						Optional[ChannelDimension] = None ,      **lowercase							:						List[str]			)							->    np.ndarray:

									'''simple docstring'''







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







			def 				A      (   self							:						int ,      lowercase							:						Union["PIL.Image.Image", TensorType, List["PIL.Image.Image"], List[TensorType]] ,      lowercase							:						Optional[bool] = None ,      lowercase							:						Optional[int] = None ,      lowercase							:						Optional[Any]=None ,      lowercase							:						Optional[bool] = None ,      lowercase							:						Optional[Union[TensorType, str]] = None ,      lowercase							:						ChannelDimension = ChannelDimension.FIRST ,      **lowercase							:						str ,      )							->    BatchFeature:

									'''simple docstring'''







									UpperCamelCase__         = do_resize if do_resize is not None else self.do_resize
									UpperCamelCase__         = do_rescale if do_rescale is not None else self.do_rescale
									UpperCamelCase__         = size_divisor if size_divisor is not None else self.size_divisor
									UpperCamelCase__         = 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"""			)

									UpperCamelCase__         = make_list_of_images(lowercase			)

									if not valid_images(lowercase			):
															raise ValueError("""Invalid image(s)"""			)

									# All transformations expect numpy arrays.
									UpperCamelCase__         = [to_numpy_array(lowercase			) for img in images]

									if do_resize:
															UpperCamelCase__         = [self.resize(lowercase ,      size_divisor=lowercase ,      resample=lowercase			) for image in images]

									if do_rescale:
															UpperCamelCase__         = [self.rescale(lowercase ,      scale=1 / 2_5_5			) for image in images]

									UpperCamelCase__         = [to_channel_dimension_format(lowercase ,      lowercase			) for image in images]

									UpperCamelCase__         = {"""pixel_values""": images}
									return BatchFeature(data=lowercase ,      tensor_type=lowercase			)
