Returning the center of widget in screenspace

I require a piece of code which can return the centre of a widget in screenspace. It should ignore anchors or the way it’s constrained. I have tried a few things with the geometry and related functions but nothing seems to return the correct value. Any idea of how I could do this?

EDIT - Found a solution

I’d use Tick Space Geometry rather than Cached Geometry, otherwise you may end up with stale or null data. Also read the tooltip of the Cached Geometry node.