Bayesian Network Implementation Python Code