def get_and_delete_messages(self):
    msgs = []
    for msg in self.message_set:
      msgs.append(msg)
      msg.delete()
    return msgs
Gets and deletes messages for this user
dataset/ETHPy150Open CollabQ/CollabQ/appengine_django/auth/models.py/User.get_and_delete_messages