code: def _interpolation_sampling(
      images,
      mesh,
      affine,
      kind="auto",
      radius=3,
      n_points=None,
      mask=None,
      inner_mesh=None,
      depth=None,
  ):
      """In each image, measure the intensity at each node of the mesh.
  
      Image intensity at each sample point is computed with trilinear
      interpolation.
      A 2-d array is returned, where each row corresponds to an image and each
      column to a mesh vertex.
      See documentation of vol_to_surf for details.
  
      """
      sample_locations = _sample_locations(
          mesh,
          affine,
          kind=kind,
          radius=radius,
          n_points=n_points,
          inner_mesh=inner_mesh,
          depth=depth,
      )
      n_vertices, n_points, _ = sample_locations.shape
      grid = [np.arange(size) for size in images[0].shape]
      interp_locations = np.vstack(sample_locations)
      masked = _masked_indices(
          interp_locations, images[0].shape, mask=mask
      )
      # loop over images rather than building a big array to use less memory
      all_samples = []
      for img in images:
          interpolator = interpolate.RegularGridInterpolator(
              grid,
              img,
              bounds_error=False,
              method="linear",
              fill_value=None,
          )
          samples = interpolator(interp_locations)
          # if all samples around a mesh vertex are outside the image,
          # there is no reasonable value to assign to this vertex.
          # in this case we return NaN for this vertex.
          samples[masked] = np.nan
          all_samples.append(samples)
      all_samples = np.asarray(all_samples)
      all_samples = all_samples.reshape(
          (len(images), n_vertices, n_points)
      )
      texture = np.nanmean(all_samples, axis=2)
      return texture
  
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 14 for calling a global function with example usage: _interpolation_sampling(images, mesh, affine, kind, radius, n_points, mask, inner_mesh, depth) and returns: texture