def recipients_to_addresses(recipients, review_request_id=None):
 addresses = set()
 for recipient in recipients:
  assert (isinstance(recipient, User) or isinstance(recipient, Group))
  if isinstance(recipient, User):
   addresses.add(build_email_address_for_user(recipient))
  else:
   addresses.update(get_email_addresses_for_group(recipient, review_request_id))
 return addresses

def recipients_to_addresses ( recipients , review_request_id = None ) : addresses = set ( ) for recipient in recipients : assert ( isinstance ( recipient , User ) or isinstance ( recipient , Group ) ) if isinstance ( recipient , User ) : addresses . add ( build_email_address_for_user ( recipient ) ) else : addresses . update ( get_email_addresses_for_group ( recipient , review_request_id ) ) return addresses
return the set of e-mail addresses for the recipients .