code: def __flush_data(self, data):
          
          if not data:
              return defer.succeed(None)
  
          assert (len(data) <= self.chunk_size)
          chunk = {"files_id": self._file["_id"],
                   "n": self._chunk_number,
                   "data": Binary(data)}
  
          def ok(_):
              self._chunk_number += 1
              self._position += len(data)
  
          # Continue writing after the insert completes (non-blocking)
          return self._chunks.insert(chunk).addCallback(ok)
docs: Flush `data` to a chunk.