This function is only used by server-side API checks. Having it defined
in the main utils module makes the deposit client transitively depend on
Django (via swh.deposit.errors), which does not seem necessary.
This undeclared dependency happens to make the swh.icinga_plugins tests red.