code: def spatio_temporal_cluster_test(
      X,
      threshold=None,
      n_permutations=1024,
      tail=0,
      stat_fun=None,
      adjacency=None,
      n_jobs=None,
      seed=None,
      max_step=1,
      spatial_exclude=None,
      step_down_p=0,
      t_power=1,
      out_type="indices",
      check_disjoint=False,
      buffer_size=1000,
      verbose=None,
  ):
      """Non-parametric cluster-level test for spatio-temporal data.
  
      This function provides a convenient wrapper for
      :func:`mne.stats.permutation_cluster_test`, for use with data
      organized in the form (observations × time × space),
      (observations × time × space), or optionally
      (observations × time × frequencies × space). For more information,
      see :footcite:p:`MarisOostenveld2007,Sassenhagen2019`.
  
      Parameters
      ----------
      X : list of array, shape (n_observations, p[, q], n_vertices)
          The data to be clustered. Each array in ``X`` should contain the
          observations for one group. The first dimension of each array is the
          number of observations from that group (and may vary between groups).
          The second, and optionally third, dimensions correspond to the
          time or time-frequency data. And, the last dimension should be spatial.
          All dimensions except the first should match across all groups.
      %(threshold_clust_f)s
      %(n_permutations_clust_int)s
      %(tail_clust)s
      %(stat_fun_clust_f)s
      %(adjacency_clust_stn)s
      %(n_jobs)s
      %(seed)s
      %(max_step_clust)s
      spatial_exclude : list of int or None
          List of spatial indices to exclude from clustering.
      %(step_down_p_clust)s
      %(f_power_clust)s
      %(out_type_clust)s
      %(check_disjoint_clust)s
      %(buffer_size_clust)s
      %(verbose)s
  
      Returns
      -------
      F_obs : array, shape (p[, q], n_vertices)
          Statistic (F by default) observed for all variables.
      clusters : list
          List type defined by out_type above.
      cluster_pv: array
          P-value for each cluster.
      H0 : array, shape (n_permutations,)
          Max cluster level stats observed under permutation.
  
      Notes
      -----
      %(threshold_clust_f_notes)s
  
      References
      ----------
      .. footbibliography::
      """
      # convert spatial_exclude before passing on if necessary
      if spatial_exclude is not None:
          exclude = _st_mask_from_s_inds(
              np.prod(X[0].shape[1:-1]),
              X[0].shape[-1],
              spatial_exclude,
              True,
          )
      else:
          exclude = None
      return permutation_cluster_test(
          X,
          threshold=threshold,
          stat_fun=stat_fun,
          tail=tail,
          n_permutations=n_permutations,
          adjacency=adjacency,
          n_jobs=n_jobs,
          seed=seed,
          max_step=max_step,
          exclude=exclude,
          step_down_p=step_down_p,
          t_power=t_power,
          out_type=out_type,
          check_disjoint=check_disjoint,
          buffer_size=buffer_size,
      )
  
imports: import numpy
  from scipy import ndimage, sparse
  from scipy.sparse.csgraph import connected_components
  from scipy.stats import f
  from scipy.stats import t
  from ..fixes import has_numba, jit
  from ..parallel import parallel_func
  from ..source_estimate import MixedSourceEstimate, SourceEstimate, VolSourceEstimate
  from ..source_space import SourceSpaces
  from ..utils import ProgressBar, _check_option, _pl, _validate_type, check_random_state, logger, split_list, verbose, warn
  from .parametric import f_oneway, ttest_1samp_no_p
label_desc: Use image node_id 29 for calling a global function with example usage: spatio_temporal_cluster_test(X, threshold, n_permutations, tail, stat_fun, adjacency, n_jobs, seed, max_step, spatial_exclude, step_down_p, t_power, out_type, check_disjoint, buffer_size, verbose) and returns: permutation_cluster_test