code: def combine_duplicate_stmts(stmts):
          def _ev_keys(sts):
              ev_keys = []
              for stmt in sts:
                  for ev in stmt.evidence:
                      ev_keys.append(ev.matches_key())
              return ev_keys
          unique_stmts = []
          for _, duplicates in Preassembler._get_stmt_matching_groups(stmts):
              ev_keys = set()
              duplicates = list(duplicates)
              start_ev_keys = _ev_keys(duplicates)
              for stmt_ix, stmt in enumerate(duplicates):
                  if stmt_ix is 0:
                      new_stmt = stmt.make_generic_copy()
                  if len(duplicates) == 1:
                      new_stmt.uuid = stmt.uuid
                  raw_text = [None if ag is None else ag.db_refs.get('TEXT')
                              for ag in stmt.agent_list(deep_sorted=True)]
                  raw_grounding = [None if ag is None else ag.db_refs
                                   for ag in stmt.agent_list(deep_sorted=True)]
                  for ev in stmt.evidence:
                      ev_key = ev.matches_key() + str(raw_text) + \
                          str(raw_grounding)
                      if ev_key not in ev_keys:
                          if 'agents' in ev.annotations:
                              ev.annotations['agents']['raw_text'] = raw_text
                              ev.annotations['agents']['raw_grounding'] = \
                                  raw_grounding
                          else:
                              ev.annotations['agents'] = \
                                  {'raw_text': raw_text,
                                   'raw_grounding': raw_grounding}
                          if 'prior_uuids' not in ev.annotations:
                              ev.annotations['prior_uuids'] = []
                          ev.annotations['prior_uuids'].append(stmt.uuid)
                          new_stmt.evidence.append(ev)
                          ev_keys.add(ev_key)
              end_ev_keys = _ev_keys([new_stmt])
              if len(end_ev_keys) != len(start_ev_keys):
                  logger.debug('%d redundant evidences eliminated.' %
                               (len(start_ev_keys) - len(end_ev_keys)))
              assert isinstance(new_stmt, Statement)
              unique_stmts.append(new_stmt)
          return unique_stmts