code: def save_sampler(sampler):
      
      db = sampler.db
      fnode = tables.filenode.newnode(db._h5file, where='/', name='__sampler__')
      import pickle
      pickle.dump(sampler, fnode)
docs: Dumps a sampler into its hdf5 database.