We should look at moving this into brooklyn core. But *not* in this pull request.