def _add_plus_addr(addr, accounts, issue):
  """Maybe add +owner, +cc, or +reviewer to the email address."""
  acct = accounts.get(addr)
  if not acct or not acct.add_plus_role:
    return addr  # No account set up, or didn't opt-in

  username, domain = addr.split('@', 1)
  if addr == issue.owner.email():
    return '%s+owner@%s' % (username, domain)
  if addr in issue.reviewers:
    return '%s+reviewer@%s' % (username, domain)
  if addr in issue.cc:
    return '%s+cc@%s' % (username, domain)

  # Catch-all for collaborators and any automatically added addresses.
  return addr