How to L2 projection of the trial function on a coarser mesh then map back to finer mesh

Hello everyone,
I am trying to accomplish the following: first map the trial function to coarser then, l2 projection, the map back to finer mesh to assemle matrix. I know this can be done in Freefem, does anyone can guide me how to achieve this in dolfinx.

CODE REMOVED BY FB

Sorry, the code as you posted it is unreadable. I removed it, please try again by editing the post and using “```” when posting your code.

Furthermore, make sure to read Read before posting: How do I get my question answered? . We won’t be able to do much with a short code snippet that we can’t run, so please make an effort to post a minimal (but complete) example.