def can_users_receive_thread_email(recipient_ids, exploration_id, has_suggestion):
 users_global_prefs = user_services.get_users_email_preferences(recipient_ids)
 users_exploration_prefs = user_services.get_users_email_preferences_for_exploration(recipient_ids, exploration_id)
 zipped_preferences = zip(users_global_prefs, users_exploration_prefs)
 result = []
 if has_suggestion:
  for (user_global_prefs, user_exploration_prefs) in zipped_preferences:
   result.append((user_global_prefs.can_receive_feedback_message_email and (not user_exploration_prefs.mute_suggestion_notifications)))
 else:
  for (user_global_prefs, user_exploration_prefs) in zipped_preferences:
   result.append((user_global_prefs.can_receive_feedback_message_email and (not user_exploration_prefs.mute_feedback_notifications)))
 return result

def can_users_receive_thread_email ( recipient_ids , exploration_id , has_suggestion ) : users_global_prefs = user_services . get_users_email_preferences ( recipient_ids ) users_exploration_prefs = user_services . get_users_email_preferences_for_exploration ( recipient_ids , exploration_id ) zipped_preferences = zip ( users_global_prefs , users_exploration_prefs ) result = [ ] if has_suggestion : for ( user_global_prefs , user_exploration_prefs ) in zipped_preferences : result . append ( ( user_global_prefs . can_receive_feedback_message_email and ( not user_exploration_prefs . mute_suggestion_notifications ) ) ) else : for ( user_global_prefs , user_exploration_prefs ) in zipped_preferences : result . append ( ( user_global_prefs . can_receive_feedback_message_email and ( not user_exploration_prefs . mute_feedback_notifications ) ) ) return result
returns if users can receive email .