docs: def generate_top_psms(psms, protcol):
      """Fed with a psms generator, this returns the 3 PSMs with
      the highest precursor intensities (or areas, or whatever is
      given in the HEADER_PRECURSOR_QUANT"""
      top_ms1_psms = {}
      for psm in psms:
          protacc = psm[protcol]
          precursor_amount = psm[mzidtsvdata.HEADER_PRECURSOR_QUANT]
          if ';' in protacc or precursor_amount == 'NA':
              continue
          precursor_amount = float(precursor_amount)
          psm_seq = psm[mzidtsvdata.HEADER_PEPTIDE]
          try:
              peptide_area = top_ms1_psms[protacc][psm_seq]
          except KeyError:
              try:
                  top_ms1_psms[protacc][psm_seq] = precursor_amount
              except KeyError:
                  top_ms1_psms[protacc] = {psm_seq: precursor_amount}
          else:
              if precursor_amount > peptide_area:
                  top_ms1_psms[protacc][psm_seq] = precursor_amount
      return top_ms1_psms