def pop_feedback_message_references(user_id, num_references_to_pop):
 model = feedback_models.UnsentFeedbackEmailModel.get(user_id)
 if (num_references_to_pop == len(model.feedback_message_references)):
  model.delete()
 else:
  message_references = model.feedback_message_references[num_references_to_pop:]
  model.delete()
  model = feedback_models.UnsentFeedbackEmailModel(id=user_id, feedback_message_references=message_references)
  model.put()
  enqueue_feedback_message_batch_email_task(user_id)

def pop_feedback_message_references ( user_id , num_references_to_pop ) : model = feedback_models . UnsentFeedbackEmailModel . get ( user_id ) if ( num_references_to_pop == len ( model . feedback_message_references ) ) : model . delete ( ) else : message_references = model . feedback_message_references [ num_references_to_pop : ] model . delete ( ) model = feedback_models . UnsentFeedbackEmailModel ( id = user_id , feedback_message_references = message_references ) model . put ( ) enqueue_feedback_message_batch_email_task ( user_id )
pops feedback message references of the given user which have been processed already .