Pre-commit hooks are small programs that get executed on git commit commands. They allow us to verify that the code respects certain coding standards, for example.
This PR adds a pre-commit hook that will run isort with pre-configured settings to automatically sort the imports of files that were affected by the commit. This will ensure the code has ever more uniform and clean import sections as new commits get merged affecting various parts of the code.
PR: #5219