If you're just testing for an empty container, you can do `if groups:` instead. If `groups` has length of 0, it will return `False`.