(exercise continued consider again example with diag( for some nonnegative model-selection parameter bayesian choice for is the maximizer of the marginal likelihood ( )that isl argmax (bs ldb ds > where ln (bs np ky xbk bd- ln |dln( ps ln to maximize ( )one can use the em algorithm with and acting as latent variables in the complete-data log-likelihood ln (bs ldefine :( - xx)- :sxy  :kyk yxb ( (ashow that the conditional density of the latent variables and is such that  - ly gamma ls bs (buse theorem to show that the expected complete-data log-likelihood is - tr( - sln |dc where is constant that does not depend on (cuse theorem to simplify the expected complete-data log-likelihood and to show that it is maximized at li sii (bi / ) for hencededuce the following and steps in the em algorithme-step given lupdate (sbb via the formulas ( -step given (sbb )update via li sii (bi / ) (dwrite python code to compute lvia the em algorithmand use it to select the best polynomial model in example possible stopping criterion is to terminate the em iterations when ln ( lt+ ln ( lt for some small where the marginal log-likelihood is ln ( lln(npb ln |dln |sln ( /