code: def _get_annotation(c, loci):
      
      data_ann_temp = {}
      data_ann = []
      counts = Counter()
      for lid in c.loci2seq:
          # original Py 2.7 code
          #for dbi in loci[lid].db_ann.keys():
          #    data_ann_temp[dbi] = {dbi: map(lambda (x): loci[lid].db_ann[dbi].ann[x].name, loci[lid].db_ann[dbi].ann.keys())}
          # suggestion by 2to3
          for dbi in list(loci[lid].db_ann.keys()):
              data_ann_temp[dbi] = {dbi: [loci[lid].db_ann[dbi].ann[x].name for x in list(loci[lid].db_ann[dbi].ann.keys())]}
              logger.debug("_json_: data_ann_temp %s %s" % (dbi, data_ann_temp[dbi]))
              counts[dbi] += 1
          # original Py 2.7 code
          #data_ann = data_ann + map(lambda (x): data_ann_temp[x], data_ann_temp.keys())
          # suggestion by 2to3
          data_ann = data_ann + [data_ann_temp[x] for x in list(data_ann_temp.keys())]
          logger.debug("_json_: data_ann %s" % data_ann)
      counts = {k: v for k, v in counts.iteritems()}
      total_loci = sum([counts[db] for db in counts])
      valid_ann = [k for k, v in counts.iteritems() if up_threshold(v, total_loci, 0.7)]
      return data_ann, valid_ann
docs: get annotation of transcriptional units