Replaced three security_groups.filter() instances at lines 180, 197 and 379, each marked with a "Centralize logic..." TODO comment, with get_security_groups() function.
Removed "Centralize logic..." TODO comments in all previously mentioned instances.
This PR makes the following changes:
I tested this PR by: