code: def flush(self):
          
          if self._wbuf:
              buffer = ''.join(self._wbuf)
              self._wbuf = []
              self.write(buffer)
docs: Write all data from buffer to socket and reset write buffer.