This method was already moved here in another PR.