title: Annotating User objects with filtered Groups
body: <p>I am trying to serialize user data in Django Rest Framework and I wish to only return selected groups that a user is a member of. Based off if the group name ends with _certified.</p>
  
  <p>I've looked at F expressions, and even Q objects but I can't seem to find an easy way to do this or if it's even possible.</p>
  
  <p><strong>NB. I'm using the built-in <code>User</code> and <code>Group</code> models.</strong></p>
  
  <p>My expected result is</p>
  
  <pre><code>{
      "User": {
          ...
          "Groups": ['role1_certified', 'role2_certified' ...] 
      }
  }
  </code></pre>
  
  <p><code>Groups</code> should only contain groups that end in <code>_certified</code></p>