Write a function that generates all possible subsets of a set.
Implement generate_subsets(items), where items is a list of distinct integers. Return a list containing every subset, including the empty subset; preserve the input order within each subset. Any consistent ordering of the returned subsets is acceptable. For example, [1, 2] produces [[], [1], [1, 2], [2]], and [] produces [[]].
def generate_subsets(items):