code: def shrunk_covariance(emp_cov, shrinkage=0.1):
      """Calculates a covariance matrix shrunk on the diagonal
  
      Read more in the :ref:`User Guide <shrunk_covariance>`.
  
      Parameters
      ----------
      emp_cov : array-like, shape (n_features, n_features)
          Covariance matrix to be shrunk
  
      shrinkage : float, 0 <= shrinkage <= 1
          Coefficient in the convex combination used for the computation
          of the shrunk estimate.
  
      Returns
      -------
      shrunk_cov : array-like
          Shrunk covariance.
  
      Notes
      -----
      The regularized (shrunk) covariance is given by
  
      (1 - shrinkage)*cov
        + shrinkage*mu*np.identity(n_features)
  
      where mu = trace(cov) / n_features
  
      """
      emp_cov = check_array(emp_cov)
      n_features = emp_cov.shape[0]
  
      mu = np.trace(emp_cov) / n_features
      shrunk_cov = (1.0 - shrinkage) * emp_cov
      shrunk_cov.flat[:: n_features + 1] += shrinkage * mu
  
      return shrunk_cov
  
imports: from __future__ import division
  import warnings
  import numpy
  from .empirical_covariance_ import empirical_covariance, EmpiricalCovariance
  from ..externals.six.moves import xrange
  from ..utils import check_array
label_desc: Use image node_id 1 for calling a global function with example usage: shrunk_covariance(emp_cov, shrinkage) and returns: shrunk_cov