function getPatch(backend) {
  return backendState(backend).getPatch()
}
Returns a patch that, when applied to an empty document, constructs the
document tree in the state described by the node state `backend`.