Fix for broken regions() introduced in #1306 and PEP8 adjustment.
Fixing merge conflicts.