code: def spatio_temporal_cluster_1samp_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 paired t-test for spatio-temporal data.
  
      This function provides a convenient wrapper for
      :func:`mne.stats.permutation_cluster_1samp_test`, for use with data
      organized in the form (observations × time × space),
      (observations × frequencies × space), or optionally
      (observations × time × frequencies × space). For details, see
      :footcite:p:`MarisOostenveld2007,Sassenhagen2019`.
  
      Parameters
      ----------
      X : array, shape (n_observations, p[, q], n_vertices)
          The data to be clustered. The first dimension should correspond to the
          difference between paired samples (observations) in two conditions.
          The second, and optionally third, dimensions correspond to the
          time or time-frequency data. And, the last dimension should be spatial.
      %(threshold_clust_t)s
      %(n_permutations_clust_all)s
      %(tail_clust)s
      %(stat_fun_clust_t)s
      %(adjacency_clust_st1)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
      %(t_power_clust)s
      %(out_type_clust)s
      %(check_disjoint_clust)s
      %(buffer_size_clust)s
      %(verbose)s
  
      Returns
      -------
      t_obs : array, shape (p[, q], n_vertices)
          T-statistic 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_t_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.shape[1:-1]), X.shape[-1], spatial_exclude, True
          )
      else:
          exclude = None
      return permutation_cluster_1samp_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 28 for calling a global function with example usage: spatio_temporal_cluster_1samp_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_1samp_test