code: def _covar_mstep_tied(
      gmm, X, responsibilities, weighted_X_sum, norm, min_covar
  ):
      """Perform the covariance M step for tied cases."""
      # Eq. 15 from K. Murphy, "Fitting a Conditional Linear Gaussian
      # Distribution"
      avg_X2 = np.dot(X.T, X)
      avg_means2 = np.dot(gmm.means_.T, weighted_X_sum)
      out = avg_X2 - avg_means2
      out *= 1.0 / X.shape[0]
      out.flat[:: len(out) + 1] += min_covar
      return out
  
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 12 for calling a global function with example usage: _covar_mstep_tied(gmm, X, responsibilities, weighted_X_sum, norm, min_covar) and returns: out