public void removeChild(CHILD child) {
        if (child.getParent() != this)
            throw new IllegalArgumentException("Could not remove " + child  + ": Expected its parent to be " +
                                               this + ", but was " + child.getParent());

        if (child instanceof Service)
            descendantServices.remove(child);

        childrenBySubId.remove(child.getSubId());
        child.setParent(null);
    }
Adds a child to this config producer.

@param child the child config producer to add
config-model/src/main/java/com/yahoo/config/model/producer/TreeConfigProducer.java