code: function fuseAnnotation (tx, annos) {
    if (!isArray(annos) || annos.length < 2) {
      throw new Error('fuseAnnotation(): at least two annotations are necessary.')
    }
    let sel, annoType
    annos.forEach(function (anno, idx) {
      if (idx === 0) {
        sel = anno.getSelection()
        annoType = anno.type
      } else {
        if (anno.type !== annoType) {
          throw new Error('fuseAnnotation(): all annotations must be of the same type.')
        }
        sel = sel.expand(anno.getSelection())
      }
    })
    // expand the first and delete the others
    for (var i = 1; i < annos.length; i++) {
      tx.delete(annos[i].id)
    }
    expandAnnotation(tx, annos[0], sel)
    tx.setSelection(sel)
  }
docs: /*
  @param {model/Document} tx
  @param {model/PropertyAnnotation[]} args.annos annotations which should be fused