def groupby_tx(exons, sambamba=False):
    """Group (unordered) exons per transcript."""
    transcripts = {}
    for exon in exons:
        if sambamba:
            exon['elements'] = dict(zip(exon['extraFields'][-2].split(','),
                                        exon['extraFields'][-1].split(',')))
        else:
            exon['elements'] = dict(exon['elements'])
        for transcript_id in exon['elements']:
            if transcripts not in transcript_id:
                transcripts[transcript_id] = []
            transcripts[transcript_id].append(exon)
    return transcripts
dataset/ETHPy150Open robinandeer/chanjo/chanjo/load/utils.py/groupby_tx/swapped operands of `not in`