I'm thinking I should move this function to the `test` folder then, because it doesn't seem reliable except for tests.  Does that seem alright to you @ochameau ?