Move this into .utils

Signed-off-by: Chris Lamb <chris@keyerror.com>