
from __future__ import annotations







def 				A__    (  lowerCamelCase   ,			lowerCamelCase   ,			lowerCamelCase   ,			lowerCamelCase  )     ->		int:

				# Base Case
				if counter == 0 or capacity == 0:
								return 0

				# If weight of the nth item is more than Knapsack of capacity,
				#   then this item cannot be included in the optimal solution,
				# else return the maximum of two cases:
				#   (1) nth item included
				#   (2) not included
				if weights[counter - 1] > capacity:
								return knapsack(lowerCamelCase   ,			lowerCamelCase   ,			lowerCamelCase   ,			counter - 1  )
				else:
								UpperCamelCase_:							Optional[int]		=  capacity - weights[counter - 1]
								UpperCamelCase_:							str		=  values[counter - 1] + knapsack(
								    lowerCamelCase   ,			lowerCamelCase   ,			lowerCamelCase   ,			counter - 1  )
								UpperCamelCase_:							Any		=  knapsack(lowerCamelCase   ,			lowerCamelCase   ,			lowerCamelCase   ,			counter - 1  )
								return max(lowerCamelCase   ,			lowerCamelCase  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()








'''simple docstring'''



from ..utils import DummyObject, requires_backends

class       _a (metaclass=_lowerCamelCase):





       """simple docstring"""




       SCREAMING_SNAKE_CASE					=     ['torch', 'librosa']






       def __init__(							self				,							*A__				,							**A__					)			->	str:
          requires_backends(self				,							["""torch""", """librosa"""]					)






       @classmethod
       def 				UpperCamelCase (							cls				,							*A__				,							**A__					)			->	Tuple:
          requires_backends(cls				,							["""torch""", """librosa"""]					)






       @classmethod
       def 				UpperCamelCase (							cls				,							*A__				,							**A__					)			->	Optional[Any]:
          requires_backends(cls				,							["""torch""", """librosa"""]					)






class       _a (metaclass=_lowerCamelCase):





       """simple docstring"""




       SCREAMING_SNAKE_CASE					=     ['torch', 'librosa']






       def __init__(							self				,							*A__				,							**A__					)			->	Dict:
          requires_backends(self				,							["""torch""", """librosa"""]					)






       @classmethod
       def 				UpperCamelCase (							cls				,							*A__				,							**A__					)			->	Optional[Any]:
          requires_backends(cls				,							["""torch""", """librosa"""]					)






       @classmethod
       def 				UpperCamelCase (							cls				,							*A__				,							**A__					)			->	Union[str, Any]:
          requires_backends(cls				,							["""torch""", """librosa"""]					)






