These utility functions could do well in ``_shared``; what do you think @ahojnnes ?