Refactoring: use dictionary comprehensions
A dictionary comprehension can create the dictionary on one line, cutting out the clutter of declaring an empty dict and then adding items.
See for reference: https://docs.sourcery.ai/Reference/Python/Default-Rules/dict-comprehension/