code: def _st_mask_from_s_inds(n_times, n_vertices, vertices, set_as=True):
      """Compute mask to apply to a spatio-temporal adjacency matrix.
  
      This can be used to include (or exclude) certain spatial coordinates.
      This is useful for excluding certain regions from analysis (e.g.,
      medial wall vertices).
  
      Parameters
      ----------
      n_times : int
          Number of time points.
      n_vertices : int
          Number of spatial points.
      vertices : list or array of int
          Vertex numbers to set.
      set_as : bool
          If True, all points except "vertices" are set to False (inclusion).
          If False, all points except "vertices" are set to True (exclusion).
  
      Returns
      -------
      mask : array of bool
          A (n_times * n_vertices) array of boolean values for masking
      """
      mask = np.zeros((n_times, n_vertices), dtype=bool)
      mask[:, vertices] = True
      mask = mask.ravel()
      if set_as is False:
          mask = np.logical_not(mask)
      return mask
  
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 30 for calling a global function with example usage: _st_mask_from_s_inds(n_times, n_vertices, vertices, set_as) and returns: mask