code: def _assert_connectivity_tangent(connectivities, conn_measure, covs):
      """Check output value properties for tangent connectivity measure \
      that they have the expected relationship \
      to the input covariance matrices.
  
      - the geometric mean of the eigenvalues
          of the mean covariance matrix is positive-definite
      - the whitening matrix (used to transform the data \
          also produces a positive-definite matrix
      """
      for true_covariance_matrix, estimated_covariance_matrix in zip(
          covs, connectivities
      ):
          assert_array_almost_equal(
              estimated_covariance_matrix, estimated_covariance_matrix.T
          )
  
          assert is_spd(conn_measure.whitening_, decimal=7)
  
          gmean_sqrt = _map_eigenvalues(np.sqrt, conn_measure.mean_)
          assert is_spd(gmean_sqrt, decimal=7)
          assert_array_almost_equal(
              conn_measure.whitening_.dot(gmean_sqrt),
              np.eye(N_FEATURES),
          )
          assert_array_almost_equal(
              gmean_sqrt.dot(
                  _map_eigenvalues(np.exp, estimated_covariance_matrix)
              ).dot(gmean_sqrt),
              true_covariance_matrix,
          )
  
imports: import copy
  import warnings
  from math import cosh, exp, log, sinh, sqrt
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from pandas import DataFrame
  from scipy import linalg
  from sklearn.covariance import EmpiricalCovariance, LedoitWolf
  from nilearn._utils.extmath import is_spd
  from nilearn.connectome.connectivity_matrices import ConnectivityMeasure, _check_spd, _check_square, _form_symmetric, _geometric_mean, _map_eigenvalues, prec_to_partial, sym_matrix_to_vec, vec_to_sym_matrix
  from nilearn.tests.test_signal import generate_signals
label_desc: Use image node_id 30 for calling a global function with example usage: _assert_connectivity_tangent(connectivities, conn_measure, covs) without return types