codegen grouping code from same nodes