parameters: (self, fsync: bool = False)
docstring: Force all buffered modifications to be written to disk.
  
          Parameters
          ----------
          fsync : bool (default False)
            call ``os.fsync()`` on the file handle to force writing to disk.
  
          Notes
          -----
          Without ``fsync=True``, flushing may not guarantee that the OS writes
          to disk. With fsync, the operation will block until the OS claims the
          file has been written; however, other caching layers may still
          interfere.
docstring_summary: Force all buffered modifications to be written to disk.
docstring_tokens: Force all buffered modifications to be written to disk .
function: def flush(self, fsync: bool = False):
          """
          Force all buffered modifications to be written to disk.
  
          Parameters
          ----------
          fsync : bool (default False)
            call ``os.fsync()`` on the file handle to force writing to disk.
  
          Notes
          -----
          Without ``fsync=True``, flushing may not guarantee that the OS writes
          to disk. With fsync, the operation will block until the OS claims the
          file has been written; however, other caching layers may still
          interfere.
          """
          if self._handle is not None:
              self._handle.flush()
              if fsync:
                  with suppress(OSError):
                      os.fsync(self._handle.fileno())
function_tokens: def flush ( self , fsync : bool = False ) : if self . _handle is not None : self . _handle . flush ( ) if fsync : with suppress ( OSError ) : os . fsync ( self . _handle . fileno ( ) )