Reindent long lines
Reuse code for consistency
Use format_map for even clearer use of local variables in format strings
Correct docstring