code: def test_connectivity_measure_check_inverse_transformation(
      kind, signals
  ):
      # without vectorization: input matrices are returned with no change
      conn_measure = ConnectivityMeasure(kind=kind)
      connectivities = conn_measure.fit_transform(signals)
  
      assert_array_almost_equal(
          conn_measure.inverse_transform(connectivities), connectivities
      )
  
      # with vectorization: input vectors are reshaped into matrices
      # if diagonal has not been discarded
      conn_measure = ConnectivityMeasure(kind=kind, vectorize=True)
      vectorized_connectivities = conn_measure.fit_transform(signals)
  
      assert_array_almost_equal(
          conn_measure.inverse_transform(vectorized_connectivities),
          connectivities,
      )
  
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 37 for calling a global function with example usage: test_connectivity_measure_check_inverse_transformation(kind, signals) without return types