code: def _masked_indices(sample_locations, img_shape, mask=None):
      """Get the indices of sample points which should be ignored.
  
      Parameters
      ----------
      sample_locations : :obj:`numpy.ndarray`, shape(n_sample_locations, 3)
          The coordinates of candidate interpolation points.
  
      img_shape : :obj:`tuple`
          The dimensions of the image to be sampled.
  
      mask : :obj:`numpy.ndarray` of shape img_shape or `None`, optional
          Part of the image to be masked. If `None`, don't apply any mask.
  
      Returns
      -------
      array of shape (n_sample_locations,)
          True if this particular location should be ignored (outside of image or
          masked).
  
      """
      kept = (sample_locations >= 0).all(axis=1)
      for dim, size in enumerate(img_shape):
          kept = np.logical_and(kept, sample_locations[:, dim] < size)
      if mask is not None:
          indices = np.asarray(
              np.floor(sample_locations[kept]), dtype=int
          )
          kept[kept] = (
              mask[indices[:, 0], indices[:, 1], indices[:, 2]] != 0
          )
      return ~kept
  
imports: import gzip
  import os
  import warnings
  from collections import namedtuple
  from collections.abc import Mapping
  import nibabel
  import numpy
  import sklearn.cluster
  import sklearn.preprocessing
  from nibabel import freesurfer, gifti
  from scipy import interpolate, sparse
  from nilearn import _utils, datasets
  from nilearn._utils import stringify_path
  from nilearn._utils.path_finding import resolve_globbing
  from nilearn.image import get_data, load_img, resampling
label_desc: Use image node_id 11 for calling a global function with example usage: _masked_indices(sample_locations, img_shape, mask) and returns: unknown