def problems_internal_stops(features, sequence, code):
    """
    check for stop codons in protein coding genes
    @param[in] features list of features
    @param[in] sequence the sequence
    @param[in] code genetic code
    @return set of gene names mit internal stop codons

    """
    istop = set()
    for feat in features:
        if feat.type != 'gene':
            continue
        mito_frag = sequence.subseq(feat.start, feat.stop, feat.strand)
        mito_frag = str(mito_frag.translate(table=code))
        if mito_frag[-1] == '*':
            mito_frag = mito_frag[:-1]
        if '*' in mito_frag:
            istop.add(feat.name)
    return istop
