T9479: fix isort import-ordering drift (#509)
Re-run isort (6.0.0, .isort.cfg) over all tracked Python files, plus the
add-trailing-comma pre-commit hook on three unit test files.
Formatting-only changes; black 25.1.0 stays clean and unit tests pass.
Co-authored-by: omnom62 <75066712+omnom62@users.noreply.github.com>