input: Write a function to generate all subsets of a given set.
  assert all_subsets([1, 2, 3]) == [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]
  assert all_subsets(['a', 'b']) == [[], ['a'], ['b'], ['a', 'b']]
  assert all_subsets([1]) == [[], [1]]
output: def all_subsets(s):
      def backtrack(start, path):
          result.append(path)
          for i in range(start, len(s)):
              backtrack(i + 1, path + [s[i]])
  
      result = []
      backtrack(0, [])
      return result