code: def abort(self):
          
          if self._closed:
              return
          self._closed = True
          self._writer.flush()
          del self._writer
docs: Abort the stream.
  
          The stream is flushed and the internal data structures are cleaned up.
          No stream footer is sent. The stream is :attr:`closed` afterwards.
  
          If the stream is already :attr:`closed`, this method does nothing.