This will help with #29865
CC: @tscrim
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 6024ffd
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/29869