I think this is worth the extra few lines for readability:

```python
group = None
for sg in existing_groups:
    if sg.name == sg_name:
        group = sg
        break
```