





'''simple docstring'''



def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			__lowercase			  =							abs(lowerCamelCase_			)
			__lowercase			  =							0
			while n > 0:
						res += n % 1_0
						n //= 1_0
			return res




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			__lowercase			  =							abs(lowerCamelCase_			)
			return n if n < 1_0 else n % 1_0 + sum_of_digits(n // 1_0			)




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			return sum(int(lowerCamelCase_			) for c in str(abs(lowerCamelCase_			)			)			)




def 				_lowerCAmelCase  (			):
			from collections.abc import Callable
			from timeit import timeit

			def benchmark_a_function(lowerCamelCase_     :					Callable						,    lowerCamelCase_     :					int			) -> None:
						__lowercase			  =							f"{func.__name__}({value})"
						__lowercase			  =							timeit(f"__main__.{call}"						,    setup='''import __main__'''			)
						print(f"{call:56} = {func(lowerCamelCase_			)} -- {timing:.4f} seconds"			)

			for value in (2_6_2_1_4_4, 1_1_2_5_8_9_9_9_0_6_8_4_2_6_2_4, 1_2_6_7_6_5_0_6_0_0_2_2_8_2_2_9_4_0_1_4_9_6_7_0_3_2_0_5_3_7_6):
						for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
									benchmark_a_function(lowerCamelCase_						,    lowerCamelCase_			)
						print()


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	benchmark()












'''simple docstring'''



from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available






@dataclass
class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			Union[List[PIL.Image.Image], np.ndarray]
	a      :			Optional[List[bool]]


if is_transformers_available() and is_torch_available():
	from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline





