Unfortunately we are importing this function into the user code. Or we should make it public, live with the duplication, or move it elsewhere.