How to create an inhomogeneous 2D mesh about a diffusion process?

See for instance How generate polygonal meshes in DOLFIN-X? And how generate triangle submesh on each polygonal elements - #2 by dokken

In future posts, you’d better give us more details (for instance: are you using dolfin or dolfinx?), see Read before posting: How do I get my question answered?