public NodeState addChild(String key, NodeState child) {
        getChild(key, true).copy(child);
        return this;
    }
Adds a child to this node at the given location. The key can be a location string, in which case the necessary
intermediate node states are created.

@param key   The location at which to add the child.
@param child The child node to add.
@return This, to allow chaining.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/systemstate/rule/NodeState.java