Please move this and the occurence in `renaming.py` to picard.ui.util to avoid code and comment duplication, even if it's just a few lines.