def get_registration_contributors():
 registrations = models.Node.find(Q('is_registration', 'eq', True))
 contributors = []
 def has_received_message(contrib):
  query = (Q('_id', 'eq', contrib._id) & Q('security_messages.{0}'.format(MESSAGE_NAME), 'exists', False))
  return (models.User.find(query).count() == 0)
 for node in registrations:
  contributors.extend([contrib for contrib in node.contributors if ((contrib not in contributors) and (not has_received_message(contrib)))])
 return contributors

def get_registration_contributors ( ) : registrations = models . Node . find ( Q ( 'is_registration' , 'eq' , True ) ) contributors = [ ] def has_received_message ( contrib ) : query = ( Q ( '_id' , 'eq' , contrib . _id ) & Q ( 'security_messages.{0}' . format ( MESSAGE_NAME ) , 'exists' , False ) ) return ( models . User . find ( query ) . count ( ) == 0 ) for node in registrations : contributors . extend ( [ contrib for contrib in node . contributors if ( ( contrib not in contributors ) and ( not has_received_message ( contrib ) ) ) ] ) return contributors
returns set of users that contribute to registrations .