There is a typo in the code snippet where the solver is used, in the assertion check an f-string is used but the "f" is missing so the output is incorrect
currently:
assert converged > 0, "Solver did not converge, got {converged}."
fixed:
assert converged > 0, f"Solver did not converge, got {converged}."