docs: def merge(self, other):
          '''Merge another link into this one. Expected that each link was created from each mate from a pair. We only know both distances to contig ends when we have read info from both mappings in a BAM file. All other info should be the same.'''
          assert self.refnames == other.refnames
          assert self.dirs == other.dirs
          assert self.lengths == other.lengths
  
          for i in range(2):
              if self.pos[i] is None:
                  if other.pos[i] is None:
                     raise Error('Error merging these two links:\n' + str(self) + '\n' + str(other))
                  self.pos[i] = other.pos[i]
              else:
                  if other.pos[i] is not None:
                     raise Error('Error merging these two links:\n' + str(self) + '\n' + str(other))