





'''simple docstring'''




import unittest

from knapsack import knapsack as k






class UpperCAmelCase							(		unittest.TestCase							):



    def 					__lowerCamelCase						(  self					):
     __UpperCAmelCase					=   0
     __UpperCAmelCase					=   [0]
     __UpperCAmelCase					=   [0]
     __UpperCAmelCase					=   len(__A					)
     self.assertEqual(k.knapsack(__A     ,			__A     ,			__A     ,			__A					)     ,			0					)

     __UpperCAmelCase					=   [60]
     __UpperCAmelCase					=   [10]
     __UpperCAmelCase					=   len(__A					)
     self.assertEqual(k.knapsack(__A     ,			__A     ,			__A     ,			__A					)     ,			0					)



    def 					__lowerCamelCase						(  self					):
     __UpperCAmelCase					=   3
     __UpperCAmelCase					=   [1, 2, 3]
     __UpperCAmelCase					=   [3, 2, 1]
     __UpperCAmelCase					=   len(__A					)
     self.assertEqual(k.knapsack(__A     ,			__A     ,			__A     ,			__A					)     ,			5					)




    def 					__lowerCamelCase						(  self					):
     __UpperCAmelCase					=   50
     __UpperCAmelCase					=   [60, 100, 120]
     __UpperCAmelCase					=   [10, 20, 30]
     __UpperCAmelCase					=   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


_A:					Tuple							=				logging.get_logger(__name__)






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			List[Any]						   =       """timm_backbone"""



    def __init__(  self     ,			__A=None     ,			__A=3     ,			__A=True     ,			__A=True     ,			__A=None     ,			**__A     ,			):
     super().__init__(**__A					)
     __UpperCAmelCase					=   backbone
     __UpperCAmelCase					=   num_channels
     __UpperCAmelCase					=   features_only
     __UpperCAmelCase					=   use_pretrained_backbone
     __UpperCAmelCase					=   True
     __UpperCAmelCase					=   out_indices if out_indices is not None else (-1,)





