code: def create_merge_psm_map(peptides, ns):
      
      psmmap = {}
      for peptide in peptides:
          seq = reader.get_peptide_seq(peptide, ns)
          psm_ids = reader.get_psm_ids_from_peptide(peptide, ns)
          for psm_id in psm_ids:
              try:
                  psmmap[seq][psm_id.text] = 1
              except KeyError:
                  psmmap[seq] = {psm_id.text: 2}
      for seq, psm_id_dict in psmmap.items():
          psmmap[seq] = [x for x in psm_id_dict]
      return psmmap
docs: Loops through peptides, stores sequences mapped to PSM ids.