This is general utility function. It should go to `invenio.utils.*`.