

"""simple docstring"""




import unittest

from knapsack import knapsack as k







class      __lowercase			(    unittest.TestCase					):

  def    __lowercase       (  self		:			Dict    ):






   '''simple docstring'''
   UpperCAmelCase__					:  List[str]					   =					0
   UpperCAmelCase__					:  Optional[int]					   =					[0]
   UpperCAmelCase__					:  Tuple					   =					[0]
   UpperCAmelCase__					:  Tuple					   =					len(__A    )
   self.assertEqual(k.knapsack(__A					,__A					,__A					,__A    )					,0    )

   UpperCAmelCase__					:  Optional[Any]					   =					[60]
   UpperCAmelCase__					:  List[str]					   =					[10]
   UpperCAmelCase__					:  List[Any]					   =					len(__A    )
   self.assertEqual(k.knapsack(__A					,__A					,__A					,__A    )					,0    )

  def    __lowercase       (  self		:			int    ):






   '''simple docstring'''
   UpperCAmelCase__					:  Tuple					   =					3
   UpperCAmelCase__					:  Any					   =					[1, 2, 3]
   UpperCAmelCase__					:  str					   =					[3, 2, 1]
   UpperCAmelCase__					:  Tuple					   =					len(__A    )
   self.assertEqual(k.knapsack(__A					,__A					,__A					,__A    )					,5    )




  def    __lowercase       (  self		:			str    ):






   '''simple docstring'''
   UpperCAmelCase__					:  Dict					   =					50
   UpperCAmelCase__					:  Optional[int]					   =					[60, 100, 120]
   UpperCAmelCase__					:  List[Any]					   =					[10, 20, 30]
   UpperCAmelCase__					:  List[Any]					   =					len(__A    )
   self.assertEqual(k.knapsack(__A					,__A					,__A					,__A    )					,220    )


if __name__ == "__main__":
    unittest.main()








"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCAmelCase =				logging.get_logger(__name__)







class      __lowercase			(    __lowerCamelCase					):
  snake_case_				       =       """timm_backbone"""

  def __init__(  self		:			List[str]					,A		:			Any=None					,A		:			List[Any]=3					,A		:			Any=True					,A		:			Union[str, Any]=True					,A		:			List[Any]=None					,**A		:			Optional[int]					,):






   '''simple docstring'''
   super().__init__(**A    )
   UpperCAmelCase__					:  Optional[int]					   =					backbone
   UpperCAmelCase__					:  Dict					   =					num_channels
   UpperCAmelCase__					:  Optional[int]					   =					features_only
   UpperCAmelCase__					:  Tuple					   =					use_pretrained_backbone
   UpperCAmelCase__					:  str					   =					True
   UpperCAmelCase__					:  List[str]					   =					out_indices if out_indices is not None else (-1,)





