code: def _compute_morph_sdr(
      mri_from, mri_to, niter_affine, niter_sdr, zooms
  ):
      """Get a matrix that morphs data from one subject to another."""
      from dipy.align.imaffine import AffineMap
  
      from .transforms import _compute_volume_registration
  
      pipeline = "all" if niter_sdr else "affines"
      niter = dict(
          translation=niter_affine,
          rigid=niter_affine,
          affine=niter_affine,
          sdr=niter_sdr if niter_sdr else (1,),
      )
      (
          pre_affine,
          sdr_morph,
          to_shape,
          to_affine,
          from_shape,
          from_affine,
      ) = _compute_volume_registration(
          mri_from, mri_to, zooms=zooms, niter=niter, pipeline=pipeline
      )
      pre_affine = AffineMap(
          pre_affine, to_shape, to_affine, from_shape, from_affine
      )
      return to_shape, zooms, to_affine, pre_affine, sdr_morph
  
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 13 for calling a global function with example usage: _compute_morph_sdr(mri_from, mri_to, niter_affine, niter_sdr, zooms) and returns: to_shape,  zooms,  to_affine,  pre_affine,  sdr_morph