human
Solve the following python programming problem given the following code:
# Create classes for prior and posterior

# %     a_0: shape parameter of the prior precision of coefficients
# %     b_0: rate  parameter of the prior precision of coefficients
# %     c_0: shape parameter of the prior noise precision
# %     d_0: rate  parameter of the prior noise precision

class Prior:
    def __init__(self,a_0=10,b_0=0.2,c_0=10,d_0=1):
        self.a_0=a_0
        self.b_0=b_0
        self.c_0=c_0
        self.d_0=d_0

class Posterior:
    def __init__(self,d,prior):
        self.mu_n=numpy.zeros((d,1))
        self.Lambda_n = numpy.eye(d)
        self.a_n      = prior.a_0
        self.b_n      = prior.b_0
        self.c_n      = prior.c_0
        self.d_n      = prior.d_0
        self.F        = -numpy.inf
        self.prior    = prior
        self.trace = []
        
# Returns the variational posterior q that maximizes the free energy.
def invert_model(y, X, prior,tolerance=10e-8,verbose=False):

    # Data shortcuts
    n,d = X.shape # observations x regressors

    # Initialize variational posterior
    q=Posterior(d,prior)
    q.F=free_energy(q,y,X,prior)

    # Variational algorithm
    nMaxIter = 30
    kX = X.T.dot(X)

    for i in range(nMaxIter):

        # (1) Update q(beta) - regression parameters
        q.Lambda_n = q.a_n/q.b_n + q.c_n/q.d_n * (X.T.dot(X))

        q.mu_n = q.c_n/q.d_n * numpy.linalg.inv(q.Lambda_n).dot(X.T.dot(y))

        # (2) Update q(alpha) - precision
        q.a_n = prior.a_0 + d/2
        q.b_n = prior.b_0 + 1/2 * (q.mu_n.T.dot(q.mu_n) + trace(inv(q.Lambda_n)));

        # (3) Update q(lambda)
        q.c_n = prior.c_0 + n/2
        pe = y - X.dot(q.mu_n)
        q.d_n = prior.d_0 + 0.5 * (pe.T.dot(pe) + trace(inv(q.Lambda_n).dot(kX))) ;

        # Compute free energy
        F_old = q.F;
        q.F = free_energy(q,y,X,prior);

        # Convergence?
        if (q.F - F_old) < tolerance:
            break
        if i == nMaxIter:
            print('tvblm: reached max iterations',i)
    if verbose:
        print('converged in %d iterations'%i)
   ...
Given the above code, generate some markdown instructions for it.
assistant
#Here is Python program to compute free energy
.

Set up code to estimate using VB