






from typing import List

import PIL
import torch
from PIL import Image

from ...configuration_utils import ConfigMixin
from ...models.modeling_utils import ModelMixin
from ...utils import PIL_INTERPOLATION







class 				lowerCamelCase_     (	a_ ,						a_     ):
       def __init__(						self		:					Any					):





        '''simple docstring'''



        super().__init__()

        self.register_buffer('''watermark_image'''							,torch.zeros((62, 62, 4)					)					)
        a		=			None




       def  SCREAMING_SNAKE_CASE_ (						self		:					Dict							,__lowerCamelCase		:					List[PIL.Image.Image]							,__lowerCamelCase		:					Tuple=None					):





        '''simple docstring'''



        a		=			images[0].height
        a		=			images[0].width

        a		=			sample_size or h

        a		=			min(h / sample_size							,w / sample_size					)
        a	, a		=			(int(h / coef					), int(w / coef					)) if coef < 1 else (h, w)

        a	, a		=			10_24**2, img_w * img_h
        a		=			(Sa / Sa) ** 0.5
        a	, a	, a		=			int(K * 62					), img_w - int(14 * K					), img_h - int(14 * K					)

        if self.watermark_image_as_pil is None:
         a		=			self.watermark_image.to(torch.uinta					).cpu().numpy()
         a		=			Image.fromarray(__lowerCamelCase							,mode='''RGBA'''					)
         a		=			watermark_image

        a		=			self.watermark_image_as_pil.resize(
            (wm_size, wm_size)							,PIL_INTERPOLATION['''bicubic''']							,reducing_gap=__lowerCamelCase					)

        for pil_img in images:
         pil_img.paste(__lowerCamelCase							,box=(wm_x - wm_size, wm_y - wm_size, wm_x, wm_y)							,mask=wm_img.split()[-1]					)

        return images













def   SCREAMING_SNAKE_CASE__						(   snake_case_  )   ->  int:


	"""simple docstring"""



	return n * (2 * n - 1)





def   SCREAMING_SNAKE_CASE__						(   snake_case_  )   ->  bool:


	"""simple docstring"""



	a		=			(1 + 2_4 * n) ** 0.5
	return ((1 + root) / 6) % 1 == 0





def   SCREAMING_SNAKE_CASE__						(   snake_case_ = 1_4_4  )   ->  int:


	"""simple docstring"""



	a		=			start
	a		=			hexagonal_num(snake_case_  )
	while not is_pentagonal(snake_case_  ):
		n += 1
		a		=			hexagonal_num(snake_case_  )
	return num


if __name__ == "__main__":
				print(F"{solution()} = ")





