private function getRootNodeFromTreeBuilder(TreeBuilder $treeBuilder, string $nodeName): NodeDefinition
    {
        return (method_exists($treeBuilder, 'getRootNode')
            ? $treeBuilder->getRootNode()
            : $treeBuilder->root($nodeName));
    }