This are two functions I'll use in my dedicated migration series. No changes in the patches itself, I try to split up my series and send helper patches earlier to make review easier.