docs: def _ref_has_region_assembled_twice(nucmer_hits, ref_seq, threshold):
          '''Returns true iff there is a part of the reference that is assembled
             more than once (ie covered by >1 nucmer hit).
             Needs a minimum proportin of the ref to be assembled more than once,
             determined by threshold.
             nucmer_hits = hits made by self._parse_nucmer_coords_file.'''
          coords = AssemblyCompare.nucmer_hits_to_ref_coords(nucmer_hits)
          covered = []
          for coords_list in coords.values():
              covered.extend(coords_list)
          covered.sort()
  
          if len(covered) <= 1:
              return False
  
          coverage = {}
          for i in covered:
              for j in range(i.start, i.end + 1):
                  coverage[j] = coverage.get(j, 0) + 1
  
          bases_depth_at_least_two = len([1 for x in coverage.values() if x > 1])
          return bases_depth_at_least_two / len(ref_seq) >= threshold