clean() {
        this.recurseUp(node => {
            if (node.hasParent()) {
                const parent = node.getParent();
                if (!parent.hasVisibleChildren()) {
                    parent.hide();
                }
            }
        });

        return this;
    }
Hide parents without any visible children.

@return {TreeNode} Node object.