<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flush(self):
 """ Flush the queue - this will emit the current queue """

        if not self._emit_partial and len(self._state) != self._state.maxlen:
            self.notify(tuple(self._state))
        self._state.clear()