there is actually a helper function in ``utils.testing`` that does that, but it's probably not really worth using here.