def _next_set(args):
    """
    Deterministically take one element from a set of sets
    """

    # no dupes, deterministic order, larger sets first
    items = sorted(list(map(frozenset, args)), key=lambda x: -len(x))
    return items[0], set(items[1:])