def gen_all_holds(hand):
    """
    Generate all possible choices of dice from hand to hold.

    hand: sorted full yahtzee hand

    Returns a set of tuples, where each tuple is sorted dice to hold
    """
    
    # start off with the original hand in set
    set_holds = set([(hand)])
    
    # now iterate with all sub hands with one element removed
    for item in hand:
        list_hand = list(hand)
        list_hand.remove(item)
        # add to set_holds this sub hand
        set_holds.add(tuple(list_hand))
        # also add to set_holds the recursion of this sub hand
        # set functionality also takes care of repeated sub hands
        set_holds.update(gen_all_holds(tuple(list_hand)))
    
    return set_holds