code: def test_summarize_clusters(kind):
      """Test cluster summary stcs."""
      src_surf = SourceSpaces(
          [dict(vertno=np.arange(10242), type="surf") for _ in range(2)]
      )
      assert src_surf.kind == "surface"
      src_vol = SourceSpaces([dict(vertno=np.arange(10), type="vol")])
      assert src_vol.kind == "volume"
      if kind == "surface":
          src = src_surf
          klass = SourceEstimate
      elif kind == "volume":
          src = src_vol
          klass = VolSourceEstimate
      else:
          assert kind == "mixed"
          src = src_surf + src_vol
          klass = MixedSourceEstimate
      n_vertices = sum(len(s["vertno"]) for s in src)
      clu = (
          np.random.random([1, n_vertices]),
          [(np.array([0]), np.array([0, 2, 4]))],
          np.array([0.02, 0.1]),
          np.array([12, -14, 30]),
      )
      kwargs = dict()
      if kind == "volume":
          with pytest.raises(ValueError, match="did not match"):
              summarize_clusters_stc(clu)
          assert len(src) == 1
          kwargs["vertices"] = [src[0]["vertno"]]
      elif kind == "mixed":
          kwargs["vertices"] = src
      stc_sum = summarize_clusters_stc(clu, **kwargs)
      assert isinstance(stc_sum, klass)
      assert stc_sum.data.shape[1] == 2
      clu[2][0] = 0.3
      with pytest.raises(RuntimeError, match="No significant"):
          summarize_clusters_stc(clu, **kwargs)
  
imports: import os
  from functools import partial
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import linalg, sparse, stats
  from mne import MixedSourceEstimate, SourceEstimate, SourceSpaces, VolSourceEstimate
  from mne.stats import combine_adjacency, ttest_ind_no_p
  from mne.stats.cluster_level import f_oneway, permutation_cluster_1samp_test, permutation_cluster_test, spatio_temporal_cluster_1samp_test, spatio_temporal_cluster_test, summarize_clusters_stc, ttest_1samp_no_p
  from mne.utils import _record_warnings, catch_logging
label_desc: Use image node_id 13 for calling a global function with example usage: test_summarize_clusters(kind) without return types