<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def messages_in_flight(self):
 """ Returns True if there are messages waiting to be sent or that we're still waiting to see if errors occur for. """

        self.prune_sent()
        if not self.send_queue.empty() or len(self.sent) > 0:
            return True
        return False