code: def flush(self):
          
  
          if self.kind == TraceField:
              self.filehandle.putth(self.traceno, self.buf)
  
          elif self.kind == BinField:
              self.filehandle.putbin(self.buf)
  
          else:
              msg = 'Object corrupted: kind {} not valid'
              raise RuntimeError(msg.format(self.kind))
docs: Commit backing storage to disk
  
          This method is largely internal, and it is not necessary to call this
          from user code. It should not be explicitly invoked and may be removed
          in future versions.