code: def h5fmem(**kwargs):
      
  
      # need a file name even tho nothing is ever written
      fn = tempfile.mktemp()
  
      # file creation args
      kwargs['mode'] = 'w'
      kwargs['driver'] = 'core'
      kwargs['backing_store'] = False
  
      # open HDF5 file
      h5f = h5py.File(fn, **kwargs)
  
      return h5f
docs: Create an in-memory HDF5 file.