<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mark_all_as_unread(self, recipient=None):
 """Mark as unread any read messages in the current queryset. Optionally, filter these by recipient first. """

        qset = self.read(True)

        if recipient:
            qset = qset.filter(recipient=recipient)

        return qset.update(unread=True)