code: def _compute_log_det_cholesky(
      matrix_chol, covariance_type, n_features
  ):
      """Compute the log-det of the cholesky decomposition of matrices.
  
      Parameters
      ----------
      matrix_chol : array-like,
          Cholesky decompositions of the matrices.
          'full' : shape of (n_components, n_features, n_features)
          'tied' : shape of (n_features, n_features)
          'diag' : shape of (n_components, n_features)
          'spherical' : shape of (n_components,)
  
      covariance_type : {'full', 'tied', 'diag', 'spherical'}
  
      n_features : int
          Number of features.
  
      Returns
      -------
      log_det_precision_chol : array-like, shape (n_components,)
          The determinant of the precision matrix for each component.
      """
      if covariance_type == "full":
          n_components, _, _ = matrix_chol.shape
          log_det_chol = np.sum(
              np.log(
                  matrix_chol.reshape(n_components, -1)[
                      :, :: n_features + 1
                  ]
              ),
              1,
          )
  
      elif covariance_type == "tied":
          log_det_chol = np.sum(np.log(np.diag(matrix_chol)))
  
      elif covariance_type == "diag":
          log_det_chol = np.sum(np.log(matrix_chol), axis=1)
  
      else:
          log_det_chol = n_features * (np.log(matrix_chol))
  
      return log_det_chol
  
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 13 for calling a global function with example usage: _compute_log_det_cholesky(matrix_chol, covariance_type, n_features) and returns: log_det_chol