Implement Em For Bayesian Networks In Python