template: Update black target-version to py39,py310,py311,py312
Make sure black generate code that is compatible with all these versions.
Staging instance, all changes can be removed at any time
Make sure black generate code that is compatible with all these versions.