Code or workaround to create snap to pixels from unwrap How can I have the snaptopixel feature working from UV editor when I use 
+ Lightmap 
+ SmartUV 
+ Unwrap
any of the above commands. In UV editor UVs->SnapToPixel selected executing any of the above commands causes the vertices of island to be to positioned proportionally that is vertices of islands have fractioned numbers e.g. 19.11, 28.12 etc.. , rather than integer numbers 19.00 , 28.00 etc..  . I want to remedy that.

If there is workaround I'd like to apply it, if there is not then I would like to implement python code for this, your guidance will be appreicated.
I'm not a massive user of this feature, but as far as I can tell, Snap to Pixels refers to snapping while you are moving UVs around in the editor using the standard translation tools, like G, R and S. See the comparison in this GIF (first I move around without Snap to Pixels enabled, then with):



The trick is, you simply enable the G tool, and the vertices will already snap. Just LMB click to confirm.