code: def _estimate_gaussian_covariances_spherical(
      resp, X, nk, means, reg_covar
  ):
      """Estimate the spherical variance values.
  
      Parameters
      ----------
      responsibilities : array-like, shape (n_samples, n_components)
  
      X : array-like, shape (n_samples, n_features)
  
      nk : array-like, shape (n_components,)
  
      means : array-like, shape (n_components, n_features)
  
      reg_covar : float
  
      Returns
      -------
      variances : array, shape (n_components,)
          The variance values of each components.
      """
      return _estimate_gaussian_covariances_diag(
          resp, X, nk, means, reg_covar
      ).mean(1)
  
imports: import numpy
  from scipy import linalg
  from .base import BaseMixture, _check_shape
  from ..externals.six.moves import zip
  from ..utils import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.extmath import row_norms
label_desc: Use image node_id 10 for calling a global function with example usage: _estimate_gaussian_covariances_spherical(resp, X, nk, means, reg_covar) and returns: _estimate_gaussian_covariances_diag