function makeChildAppender(nodeWriter, thisArg) {
  return (
    /**
     * @param {Element} node Node.
     * @param {*} value Value to be written.
     * @param {Array<*>} objectStack Object stack.
     * @this {*}
     */
    function (node, value, objectStack) {
      nodeWriter.call(thisArg ?? this, node, value, objectStack);
      const parent = /** @type {NodeStackItem} */ (
        objectStack[objectStack.length - 1]
      );
      const parentNode = parent.node;
      parentNode.appendChild(node);
    }
  );
}
Create a serializer that appends nodes written by its `nodeWriter` to its
designated parent. The parent is the `node` of the
{@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.
@param {function(this: T, Node, V, Array<*>): void} nodeWriter Node writer.
@param {T} [thisArg] The object to use as `this` in `nodeWriter`.
@return {Serializer} Serializer.
@template T, V