code: def _ancova(Y_idx, Y_e, hdmr):
      """Analysis of Covariance. It calculates uncorrelated and correlated contribution
      to the model output variance
  
      Parameters
      ----------
      Y_idx : numpy.array
          Model output for a single bootstrap iteration
      Y_e : numpy.array
          Emulated output
      hdmr : namedtuple
          Core parameters of hdmr expansion
  
      Returns
      -------
      S : numpy.array
          Sensitivity index (total contribution)
      Sa : numpy.array
          Sensitivity index (uncorrelated contribution)
      Sb : numpy.array
          Sensitivity index (correlated contribution)
  
      Notes
      -----
      Please see the reference below
  
      .. [1] Li, G., Rabitz, H., Yelvington, P., Oluwole, O., Bacon, F., Kolb, C., and Schoendorf, J. 2010.
          Global Sensitivity Analysis for Systems with Independent and/or Correlated Inputs.
          The Journal of Physical Chemistry A, 114(19), p.6022-6032.
      """
      # Initialize sensitivity indices
      S = np.zeros(hdmr.nc_t)
      Sa = np.zeros(hdmr.nc_t)
      Sb = np.zeros(hdmr.nc_t)
  
      # Compute the sum of all Y_em terms
      Y_sum = np.sum(Y_e, axis=1)
  
      # Total Variance
      tot_v = np.var(Y_idx)
  
      # Analysis of covariance
      for j in range(hdmr.nc_t):
          # Covariance matrix of jth term of Y_em and actual Y
          c = np.cov(np.stack((Y_e[:, j], Y_idx), axis=0))
  
          # Total sensitivity of jth term
          S[j] = c[0, 1] / tot_v  # Eq. 19
  
          # Covariance matrix of jth term with emulator Y without jth term
          c = np.cov(np.stack((Y_e[:, j], Y_sum - Y_e[:, j]), axis=0))
  
          # Structural contribution of jth term
          Sa[j] = c[0, 0] / tot_v  # Eq. 20
  
          # Correlative contribution of jth term
          Sb[j] = c[0, 1] / tot_v  # Eq. 21
  
      return S, Sa, Sb
  
imports: import math
  import warnings
  from typing import Dict, Tuple
  from types import MethodType
  from itertools import combinations, product
  from collections import defaultdict, namedtuple
  import numpy
  from pandas import DataFrame
  from numpy.linalg import det, pinv, matrix_rank
  from scipy.linalg import svd, LinAlgError, solve
  from scipy import stats, special
  from .None import common_args
  from ..util import read_param_file, ResultDict
label_desc: Use image node_id 14 for calling a global function with example usage: _ancova(Y_idx, Y_e, hdmr) and returns: S,  Sa,  Sb