def all_subsets(s, target):
    """Return all subsets of `s` that sum `target`.
    TC: O(2^N), where N is number of elements in `s`."""

    if not s:
        return {}

    solutions = set()

    def _all_subsets(current_subset, index, current_sum):
        if current_sum == target:
            solutions.add(current_subset)

        if index == len(s):
            return

        _all_subsets(current_subset, index + 1, current_sum)
        _all_subsets(current_subset + (s[index],), index + 1, current_sum + s[index])

    _all_subsets((), 0, 0)

    return solutions