<div id="comment:0"></div> (cherry-picked from #32432) CC: @mwageringel @kwankyu Component: **refactoring** Author: **Matthias Koeppe** Branch/Commit: **[`bdd0325`](https://github.com/sagemath/sagetrac-mirror/commit/bdd032501fd8ad7b5363c4269cdc598c9fd29826)** Reviewer: **Kwankyu Lee** _Issue created by migration from https://trac.sagemath.org/ticket/32634_