Solve Dynamic Programming Problem and find its optimal solution.
Given a list of numbers, return a subsequence of non-consecutive numbers in the form of a list that would have the maximum sum. When the numbers are all negatives your code should return []
Example 1: Input: [7,2,5,8,6]
Output: [7,5,6] (This will have sum of 18 )
Example 2: Input: [−1,−1,0]
Output: [0] (This is the maximum possible sum for this array)
Example 3: Input: [−1,−1,−10,−34]
Output: []
Implement the solution of this problem using dynamic Programming. Name your function max_independent_set(nums). Name your file MaxSet.py