Use dict.items to avoid unnecessary lookups.
# What does this PR do?

It's more efficient to iterate over key, value dict pairs instead of iterating over keys and performing value lookups on each iteration. It's also more idiomatic.
_The documentation is not available anymore as the PR was closed or merged._