

"""simple docstring"""






import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


_lowerCAmelCase       						=		logging.get_logger(__name__)







class 						__UpperCamelCase     (     __lowercase    ):
  _UpperCAmelCase        =		"upernet"

  def __init__(		self     ,_A=None     ,_A=512     ,_A=0.0_2     ,_A=[1, 2, 3, 6]     ,_A=True     ,_A=0.4     ,_A=384     ,_A=256     ,_A=1     ,_A=False     ,_A=255     ,**_A     ,):
      '''simple docstring'''

      super().__init__(**_A   )

      if backbone_config is None:
          logger.info('`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'   )
          _lowerCAmelCase							: int	=     CONFIG_MAPPING['resnet'](out_features=['stage1', 'stage2', 'stage3', 'stage4']   )
      elif isinstance(_A     ,_A   ):
          _lowerCAmelCase							: List[Any]	=     backbone_config.get('model_type'   )
          _lowerCAmelCase							: Any	=     CONFIG_MAPPING[backbone_model_type]
          _lowerCAmelCase							: Optional[Any]	=     config_class.from_dict(_A   )

      _lowerCAmelCase							: Tuple	=     backbone_config
      _lowerCAmelCase							: int	=     hidden_size
      _lowerCAmelCase							: Dict	=     initializer_range
      _lowerCAmelCase							: Dict	=     pool_scales
      _lowerCAmelCase							: List[str]	=     use_auxiliary_head
      _lowerCAmelCase							: str	=     auxiliary_loss_weight
      _lowerCAmelCase							: int	=     auxiliary_in_channels
      _lowerCAmelCase							: int	=     auxiliary_channels
      _lowerCAmelCase							: int	=     auxiliary_num_convs
      _lowerCAmelCase							: int	=     auxiliary_concat_input
      _lowerCAmelCase							: Union[str, Any]	=     loss_ignore_index







  def __lowerCamelCase		(		self   ):
      '''simple docstring'''

      _lowerCAmelCase							: Tuple	=     copy.deepcopy(self.__dict__   )
      _lowerCAmelCase							: str	=     self.backbone_config.to_dict()
      _lowerCAmelCase							: List[Any]	=     self.__class__.model_type
      return output







from __future__ import annotations


def 				__A(lowerCAmelCase    ,	lowerCAmelCase			)		->					list[list[int]]:

		"""simple docstring"""






		_UpperCamelCase         =						[]
		_UpperCamelCase         =						[]
		_UpperCamelCase         =						0
		_UpperCamelCase         =						sum(lowerCAmelCase			)
		create_state_space_tree(lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase			)
		return result


def 				__A(lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	)		->					None:

		"""simple docstring"""






		if sum(lowerCAmelCase			) > max_sum or (remaining_nums_sum + sum(lowerCAmelCase			)) < max_sum:
				return
		if sum(lowerCAmelCase			) == max_sum:
				result.append(lowerCAmelCase			)
				return
		for index in range(lowerCAmelCase    ,	len(lowerCAmelCase			)			):
				create_state_space_tree(
				    lowerCAmelCase    ,	lowerCAmelCase    ,	index + 1    ,	[*path, nums[index]]    ,	lowerCAmelCase    ,	remaining_nums_sum - nums[index]    ,	)
lowerCamelCase__						=				[3, 34, 4, 12, 5, 2]
lowerCamelCase__						=				9
lowerCamelCase__						=				generate_sum_of_subsets_soln(nums, max_sum)







print(*result)



