`from scipy.stats import multivariate_normal ` should be added at the beginning of the second snippet of code
from scipy.stats import multivariate_normalshould be added at the beginning of the second snippet of code