Refactor Monolith
拆分大函数
A 12-line function that does three jobs. Split it into three named one-job helpers + a thin orchestrator. Behavior must be preserved.
Before — the monolith
Works, but tangled
After — three helpers + thin describe
Python · runnable