code: def test_confounds_connectome_measure_errors(signals):
      # Generate signals and compute covariances and apply confounds while
      # computing covariances
      signals, confounds = _signals()
  
      # Raising error for input confounds are not iterable
      conn_measure = ConnectivityMeasure(vectorize=True)
      msg = "'confounds' input argument must be an iterable"
  
      with pytest.raises(ValueError, match=msg):
          conn_measure._check_input(X=signals, confounds=1.0)
  
      with pytest.raises(ValueError, match=msg):
          conn_measure._fit_transform(
              X=signals, do_fit=True, do_transform=True, confounds=1.0
          )
  
      with pytest.raises(ValueError, match=msg):
          conn_measure.fit_transform(X=signals, y=None, confounds=1.0)
  
      # Raising error for input confounds are given but not vectorize=True
      conn_measure = ConnectivityMeasure(vectorize=False)
      with pytest.raises(
          ValueError,
          match="'confounds' are provided but vectorize=False",
      ):
          conn_measure.fit_transform(signals, None, confounds[:10])
  
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 41 for calling a global function with example usage: test_confounds_connectome_measure_errors(signals) without return types