The above logic seems more complicated than it needs to be.  There are a lot of branches to deal with.  It might be simpler if you did stuff like:

```
should_show_collaborators = ...
if should_show_collaborators:
  values['collaborator_emails'] = get_collaborator_emails() 
```