This is used by the unit-test code, but I could imagine it being useful for mainstream use cases too.