def subsets(nums):
n = len(nums)<EOL>total = <NUM_LIT:1> << n<EOL>res = set()<EOL>for i in range(total):<EOL><INDENT>subset = tuple(num for j, num in enumerate(nums) if i & <NUM_LIT:1> << j)<EOL>res.add(subset)<EOL><DEDENT>return res<EOL>
:param nums: List[int]
:return: Set[tuple]