Implement a function that generates all unique subsets from a list of integers. The input list may contain duplicates, and the output should include all possible subsets without duplication of the same subset.
The function takes a single argument nums, which is a list of integers. The list may contain duplicate values. The length of the list can range from 0 to 100.
Output Requirements
The function should return a list of lists, where each inner list represents a unique subset of the input list nums.
The subsets in the output should be sorted in ascending order, and the entire output should also be sorted based on the lexicographic order of lists.
Implementation Details
The function should first sort the input list nums to facilitate the generation of unique subsets.
Use a recursive approach to explore all possible subsets, ensuring to skip over duplicates.
Append each unique subset to the results list.
The subsets should be represented as lists, and the overall output should be a list of these lists.
File Structure
The implementation should be written in a file named /app/solution.py. Make sure to include necessary imports, and structure your code clearly for maintainability.