code: def _log_multivariate_normal_density_diag(X, means, covars):
      """Compute Gaussian log-density at X for a diagonal model."""
      n_samples, n_dim = X.shape
      lpr = -0.5 * (
          n_dim * np.log(2 * np.pi)
          + np.sum(np.log(covars), 1)
          + np.sum((means**2) / covars, 1)
          - 2 * np.dot(X, (means / covars).T)
          + np.dot(X**2, (1.0 / covars).T)
      )
      return lpr
  
imports: import numpy
  from scipy import linalg
  from time import time
  from ..base import BaseEstimator
  from ..utils import check_random_state, check_array, deprecated
  from ..utils.extmath import logsumexp
  from ..utils.validation import check_is_fitted
  from ..None import cluster
  from sklearn.externals.six.moves import zip
label_desc: Use image node_id 3 for calling a global function with example usage: _log_multivariate_normal_density_diag(X, means, covars) and returns: lpr