<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def restore_sampler(fname):
 """ Creates a new sampler from an hdf5 database. """

    hf = tables.open_file(fname)
    fnode = hf.root.__sampler__
    import pickle
    sampler = pickle.load(fnode)
    return sampler