This was in a different PR wasn't it?

Can we move it into a dedicated helper method please?