

def 	_a       (				__lowerCAmelCase		:      list[int]   ,							__lowerCAmelCase		:      int     ):

		"""simple docstring"""

		snake_case__						:       Optional[int]       						=  len(__lowerCAmelCase     )
		snake_case__						:       List[Any]       						=  [[False] * (required_sum + 1) for _ in range(arr_len + 1     )]

		# for each arr value, a sum of zero(0) can be formed by not taking any element
		# hence True/1
		for i in range(arr_len + 1     ):
				snake_case__						:       Tuple       						=  True

		# sum is not zero and set is empty then false
		for i in range(1   ,							required_sum + 1     ):
				snake_case__						:       Union[str, Any]       						=  False

		for i in range(1   ,							arr_len + 1     ):
				for j in range(1   ,							required_sum + 1     ):
						if arr[i - 1] > j:
								snake_case__						:       int       						=  subset[i - 1][j]
						if arr[i - 1] <= j:
								snake_case__						:       List[Any]       						=  subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

		return subset[arr_len][required_sum]


if __name__ == "__main__":
					import doctest

					doctest.testmod()






'''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     a			(				SCREAMING_SNAKE_CASE			,			unittest.TestCase       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    FlaxAutoencoderKL







						@property
						def       __magic_name__							(							self					:      str  ):



								'''simple docstring'''



								snake_case__						:       Any       						=  4
								snake_case__						:       Optional[Any]       						=  3
								snake_case__						:       Optional[int]       						=  (3_2, 3_2)

								snake_case__						:       Optional[int]       						=  jax.random.PRNGKey(0  )
								snake_case__						:       Union[str, Any]       						=  jax.random.uniform(snake_case_			,			((batch_size, num_channels) + sizes)  )

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







						def       __magic_name__							(							self					:      Union[str, Any]  ):



								'''simple docstring'''



								snake_case__						:       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,
								}
								snake_case__						:       Dict       						=  self.dummy_input
								return init_dict, inputs_dict



