code: def h5ftmp(**kwargs):
      
  
      # create temporary file name
      suffix = kwargs.pop('suffix', '.h5')
      prefix = kwargs.pop('prefix', 'scikit_allel_')
      tempdir = kwargs.pop('dir', None)
      fn = tempfile.mktemp(suffix=suffix, prefix=prefix, dir=tempdir)
      atexit.register(os.remove, fn)
  
      # file creation args
      kwargs['mode'] = 'w'
  
      # open HDF5 file
      h5f = h5py.File(fn, **kwargs)
  
      return h5f
docs: Create an HDF5 file backed by a temporary file.