docs: def _flush_raw_or_buffered(self):
          """
          Flush using raw of buffered methods.
          """
          # Flush only if bytes written
          # This avoid no required process/thread
          # creation and network call.
          # This step is performed by raw stream.
          if self._buffer_seek and self._seek:
              self._seek += 1
              with handle_os_exceptions():
                  self._flush()
  
          # If data lower than buffer size
          # flush data with raw stream to reduce IO calls
          elif self._buffer_seek:
              self._raw._write_buffer = self._get_buffer()
              self._raw._seek = self._buffer_seek
              self._raw.flush()