code: function ensureParentChildRelationship(parent, child) {
    // parent === null means, we are detaching the coroutine. We still want to unlink the previous
    // parent though
    if (parent === undefined) {
      return
    }
    if (child.parent != null) {
      const oldParent = child.parent
      unLink(child)
      tryEnd(oldParent)
      child.onReturnHandle.dispose()
    }
    if (parent != null) {
      makeLink(child, parent)
      child.onReturnHandle = onReturn(child, (err, res) => {
        unLink(child)
        tryEnd(parent)
      })
    }
  }
docs: this causes: - parent is listed as child's parent - child is listed amongst parent children - correctly handles parent == null case - correctly handles the case where child.parent is already being set to some coroutine. This is important when changing parent from the 'lexical' parent to the one specified in options