code: def hdf5new(datadir=None):
      
      datadir = datadir or get_datadir()
      calc_id = get_last_calc_id(datadir) + 1
      fname = os.path.join(datadir, 'calc_%d.hdf5' % calc_id)
      new = hdf5.File(fname, 'w')
      new.path = fname
      return new
docs: Return a new `hdf5.File by` instance with name determined by the last
      calculation in the datadir (plus one). Set the .path attribute to the
      generated filename.