human
Complete this python program:
def _e_step(psamples, W_list, b_list, n_steps=100, eps=1e-05):
assistant
#Here is the Python program you requested.

    """Performs \n_steps\ of mean-field inference (used to compute positive phase
    statistics)
    Parameters
    psamples : array-like object of theano shared variables
    State of each layer of the DBM (during the inference process).
    psamples[0] points to the input
    n_steps :  integer
    Number of iterations of mean-field to perform
    """
    depth = len(psamples)
    def mf_iteration(*psamples):
        new_psamples = [p for p in psamples]
        for i in xrange(1, depth, 2):
            new_psamples[i] = hi_given(psamples, i, W_list, b_list)
        for i in xrange(2, depth, 2):
            new_psamples[i] = hi_given(psamples, i, W_list, b_list)
        score = 0.0
        for i in xrange(1, depth):
            score = T.maximum(T.mean(abs((new_psamples[i] - psamples[i]))), score)
        return (new_psamples, theano.scan_module.until((score < eps)))
    (new_psamples, updates) = scan(mf_iteration, outputs_info=psamples, n_steps=n_steps)
    return [x[(-1)] for x in new_psamples]