code: def _estimate_gaussian_parameters(
      X, resp, reg_covar, covariance_type
  ):
      """Estimate the Gaussian distribution parameters.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          The input data array.
  
      resp : array-like of shape (n_samples, n_components)
          The responsibilities for each data sample in X.
  
      reg_covar : float
          The regularization added to the diagonal of the covariance matrices.
  
      covariance_type : {'full', 'tied', 'diag', 'spherical'}
          The type of precision matrices.
  
      Returns
      -------
      nk : array-like of shape (n_components,)
          The numbers of data samples in the current components.
  
      means : array-like of shape (n_components, n_features)
          The centers of the current components.
  
      covariances : array-like
          The covariance matrix of the current components.
          The shape depends of the covariance_type.
      """
      nk = resp.sum(axis=0) + 10 * np.finfo(resp.dtype).eps
      means = np.dot(resp.T, X) / nk[:, np.newaxis]
      covariances = {
          "full": _estimate_gaussian_covariances_full,
          "tied": _estimate_gaussian_covariances_tied,
          "diag": _estimate_gaussian_covariances_diag,
          "spherical": _estimate_gaussian_covariances_spherical,
      }[covariance_type](resp, X, nk, means, reg_covar)
      return nk, means, covariances
  
imports: import numpy
  from scipy import linalg
  from ..utils import check_array
  from ..utils._param_validation import StrOptions
  from ..utils.extmath import row_norms
  from ._base import BaseMixture, _check_shape
label_desc: Use image node_id 11 for calling a global function with example usage: _estimate_gaussian_parameters(X, resp, reg_covar, covariance_type) and returns: nk,  means,  covariances