class NodeGenerator extends Generator {
    protected NodeGenerator(SourceRoot sourceRoot) {
        super(sourceRoot);
    }

    public final void generate() throws Exception {
        Log.info("Running %s", () -> getClass().getSimpleName());
        for (BaseNodeMetaModel nodeMetaModel : JavaParserMetaModel.getNodeMetaModels()) {
            Pair<CompilationUnit, ClassOrInterfaceDeclaration> result = parseNode(nodeMetaModel);
            generateNode(nodeMetaModel, result.a, result.b);
        }
        after();
    }

    protected Pair<CompilationUnit, ClassOrInterfaceDeclaration> parseNode(BaseNodeMetaModel nodeMetaModel) {
        CompilationUnit nodeCu = sourceRoot.parse(nodeMetaModel.getPackageName(), nodeMetaModel.getTypeName() + ".java");
        ClassOrInterfaceDeclaration nodeCoid = nodeCu.getClassByName(nodeMetaModel.getTypeName()).orElseThrow(() -> new AssertionError("Can't find class"));
        return new Pair<>(nodeCu, nodeCoid);
    }

    /**
     * Annotate a method with the {@link Override} annotation, if it overrides other method.
     *
     * @param nodeMetaModel     The current meta model.
     * @param methodDeclaration The method declaration.
     */
    protected void annotateWhenOverridden(BaseNodeMetaModel nodeMetaModel, MethodDeclaration methodDeclaration) {<FILL_FUNCTION_BODY>}

    protected void after() throws Exception {

    }

    protected abstract void generateNode(BaseNodeMetaModel nodeMetaModel, CompilationUnit nodeCu, ClassOrInterfaceDeclaration nodeCoid) throws Exception;
}

        Class<? extends Node> type = nodeMetaModel.getType();
        Class<?> superClass = type.getSuperclass();

        boolean isOverriding = Arrays.stream(superClass.getMethods())
                .filter(m -> m.getName().equals(methodDeclaration.getNameAsString()))
                .anyMatch(m -> m.getParameters().length == methodDeclaration.getParameters().size());
        if (isOverriding) {
            annotateOverridden(methodDeclaration);
        }
    
<methods>public abstract void generate() throws java.lang.Exception<variables>protected final non-sealed com.github.javaparser.utils.SourceRoot sourceRoot