





"""simple docstring"""


import unittest

from diffusers import FlaxAutoencoderKL
from diffusers.utils import is_flax_available
from diffusers.utils.testing_utils import require_flax

from .test_modeling_common_flax import FlaxModelTesterMixin


if is_flax_available():
		import jax






@require_flax
class 							lowercase__			(   __SCREAMING_SNAKE_CASE					,     unittest.TestCase	):

			"""simple docstring"""
			__lowerCAmelCase     :				str										=  FlaxAutoencoderKL







			@property
			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Optional[int]				   =			4
									UpperCamelCase				:		str				   =			3
									UpperCamelCase				:		List[Any]				   =			(3_2, 3_2)

									UpperCamelCase				:		Union[str, Any]				   =			jax.random.PRNGKey(0    )
									UpperCamelCase				:		str				   =			jax.random.uniform(_A						,   ((batch_size, num_channels) + sizes)    )

									return {"sample": image, "prng_key": prng_key}







			def   _a      (      self    ):






									'''simple docstring'''







									UpperCamelCase				:		Any				   =			{
									    """block_out_channels""": [3_2, 6_4],
									    """in_channels""": 3,
									    """out_channels""": 3,
									    """down_block_types""": ["""DownEncoderBlock2D""", """DownEncoderBlock2D"""],
									    """up_block_types""": ["""UpDecoderBlock2D""", """UpDecoderBlock2D"""],
									    """latent_channels""": 4,
									}
									UpperCamelCase				:		List[str]				   =			self.dummy_input
									return init_dict, inputs_dict










"""simple docstring"""


from math import ceil, sqrt

def      UpperCamelCase							(SCREAMING_SNAKE_CASE = 100_0000     ):
						UpperCamelCase				:		int				   =			0

						for outer_width in range(3							,     (limit // 4) + 2     ):
												if outer_width**2 > limit:
																		UpperCamelCase				:		Optional[Any]				   =			max(ceil(sqrt(outer_width**2 - limit     )     )							,     1     )
												else:
																		UpperCamelCase				:		str				   =			1
												if (outer_width - hole_width_lower_bound) % 2:
																		hole_width_lower_bound += 1

												answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

						return answer


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



