code: def test_flush_rewind():
      stream = BytesIO()
      with make_simple(stream, mode="w") as f:
          x = f.createDimension("x", 4)
          v = f.createVariable("v", "i2", ["x"])
          v[:] = 1
          f.flush()
          len_single = len(stream.getvalue())
          f.flush()
          len_double = len(stream.getvalue())
  
      assert len_single == len_double
  
file_path: nibabel/nibabel/externals/tests/test_netcdf.py
imports: import os
  from os.path import join, dirname
  from io import BytesIO
  from glob import glob
  from contextlib import contextmanager
  import numpy
  import pytest
  from ..netcdf import netcdf_file
label_desc: Use image node_id 8 for calling a global function with example usage: test_flush_rewind() without return types