code: def _get_src_data(src, mri_resolution=True):
      # copy data to avoid conflicts
      _validate_type(
          src,
          (_BaseSurfaceSourceEstimate, "path-like", SourceSpaces),
          "src",
          "source space or surface source estimate",
      )
      if isinstance(src, _BaseSurfaceSourceEstimate):
          src_t = [
              dict(vertno=src.vertices[0]),
              dict(vertno=src.vertices[1]),
          ]
          src_kind = "surface"
          src_subject = src.subject
      else:
          src_t = _ensure_src(src).copy()
          src_kind = src_t.kind
          src_subject = src_t._subject
      del src
      _check_option(
          "src kind", src_kind, ("surface", "volume", "mixed")
      )
  
      # extract all relevant data for volume operations
      src_data = dict()
      if src_kind in ("volume", "mixed"):
          use_src = src_t[-1]
          shape = use_src["shape"]
          start = 0 if src_kind == "volume" else 2
          for si, s in enumerate(src_t[start:], start):
              if s.get("interpolator", None) is None:
                  if mri_resolution:
                      raise RuntimeError(
                          "MRI interpolator not present in src[%d], "
                          "cannot use mri_resolution=True" % (si,)
                      )
                  interpolator = None
                  break
          else:
              interpolator = sum(
                  (s["interpolator"] for s in src_t[start:]), 0.0
              )
          inuses = [s["inuse"] for s in src_t[start:]]
          src_data.update(
              {
                  "src_shape": (shape[2], shape[1], shape[0]),  # SAR
                  "src_affine_vox": use_src["vox_mri_t"]["trans"],
                  "src_affine_src": use_src["src_mri_t"]["trans"],
                  "src_affine_ras": use_src["mri_ras_t"]["trans"],
                  "src_shape_full": (  # SAR
                      use_src["mri_height"],
                      use_src["mri_depth"],
                      use_src["mri_width"],
                  ),
                  "interpolator": interpolator,
                  "inuse": inuses,
                  "to_vox_map": None,
              }
          )
      if src_kind in ("surface", "mixed"):
          src_data.update(
              vertices_from=[s["vertno"].copy() for s in src_t[:2]]
          )
  
      # delete copy
      return src_data, src_kind, src_subject
  
imports: import copy
  import os.path
  import warnings
  import numpy
  from scipy import sparse
  from .fixes import _get_img_fdata
  from .morph_map import read_morph_map
  from .parallel import parallel_func
  from .source_estimate import _BaseSourceEstimate, _BaseSurfaceSourceEstimate, _BaseVolSourceEstimate, _get_ico_tris
  from .source_space._source_space import SourceSpaces, _ensure_src, _grid_interp
  from .surface import _compute_nearest, mesh_edges, read_surface
  from .utils import BunchConst, ProgressBar, _check_fname, _check_option, _custom_lru_cache, _ensure_int, _import_h5io_funcs, _import_nibabel, _validate_type, check_version, fill_doc, get_subjects_dir, logger, use_log_level, verbose, warn
  from .utils import warn
label_desc: Use image node_id 10 for calling a global function with example usage: _get_src_data(src, mri_resolution) and returns: src_data,  src_kind,  src_subject