code: func (h *handler) breakAndDeleteDoc(ctx context.Context, docRef blob.Ref) error {
  	doc, err := h.fetchDocument(docRef)
  	if err != nil {
  		return fmt.Errorf("document %v not found: %v", docRef, err)
  	}
  	if err := h.deleteNode(ctx, docRef); err != nil {
  		return fmt.Errorf("could not delete document %v: %v", docRef, err)
  	}
  	for _, page := range doc.pages {
  		if err := h.delAttribute(ctx, page, "document", ""); err != nil {
  			return fmt.Errorf("could not unset document of scan %v: %v", page, err)
  		}
  	}
  	return nil
  }
docs: // breakAndDeleteDoc deletes the given document struct and marks all of its
  // associated mediaObject as not being part of a document