docs: def _get_remaining_known_ref_variants(known_ref_variants, used_ref_variants, nucmer_coords):
          '''Finds variants where ref has the variant and so does the contig. Which means
             that there was no mummer call to flag it up so need to look through the known
             ref variants. Also need to check that the variant is in a nucmer match to an
             assembly contig.'''
          variants = []
  
          for ref_variant_pos, ref_variants_set in sorted(known_ref_variants.items()):
              for known_ref_variant in ref_variants_set:
                  if known_ref_variant not in used_ref_variants:
                      variant_pos_matches_contig = False
                      pos = known_ref_variant.variant.position
  
                      if known_ref_variant.seq_type == 'n':
                          ref_interval = intervals.Interval(pos, pos)
                      elif known_ref_variant.seq_type == 'p':
                          ref_interval = intervals.Interval(3 * pos, 3 * pos + 2)
                      else:
                          raise Error('Unexpected variant type "' + known_ref_variant.variant_type + '" in _get_remaining_known_ref_variants. Cannot continue')
  
                      for interval in nucmer_coords:
                          if ref_interval.intersects(interval):
                              variant_pos_matches_contig = True
                              break
  
                      if variant_pos_matches_contig:
                          variants.append((None, known_ref_variant.seq_type, None, None, None, {known_ref_variant}, set()))
  
          return variants