code: def primary_mrna(entrystream, parenttype='gene'):
      for entry in entrystream:
          if not isinstance(entry, tag.Feature):
              yield entry
              continue
          for parent in tag.select.features(entry, parenttype, traverse=True):
              mrnas = [f for f in parent.children if f.type == 'mRNA']
              if len(mrnas) == 0:
                  continue
              _emplace_pmrna(mrnas, parent)
          yield entry