code: def test_geometric_mean_geodesic():
      n_matrices = 10
      n_features = 6
      sym = np.arange(n_features) / np.linalg.norm(
          np.arange(n_features)
      )
      sym = sym * sym[:, np.newaxis]
      times = np.arange(n_matrices)
      non_singular = np.eye(n_features)
      non_singular[1:3, 1:3] = np.array([[-1, -0.5], [-0.5, -1]])
      spds = [
          non_singular.dot(_map_eigenvalues(np.exp, time * sym)).dot(
              non_singular.T
          )
          for time in times
      ]
      gmean = non_singular.dot(
          _map_eigenvalues(np.exp, times.mean() * sym)
      ).dot(non_singular.T)
      assert_array_almost_equal(_geometric_mean(spds), gmean)
  
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 13 for calling a global function with example usage: test_geometric_mean_geodesic() without return types