code: def read_source_morph(fname):
      """Load the morph for source estimates from a file.
  
      Parameters
      ----------
      fname : path-like
          Path to the file containing the morph source estimates.
  
      Returns
      -------
      source_morph : instance of SourceMorph
          The loaded morph.
      """
      read_hdf5, _ = _import_h5io_funcs()
      vals = read_hdf5(fname)
      if vals["pre_affine"] is not None:  # reconstruct
          from dipy.align.imaffine import AffineMap
  
          affine = vals["pre_affine"]
          vals["pre_affine"] = AffineMap(None)
          vals["pre_affine"].__dict__ = affine
      if vals["sdr_morph"] is not None:
          from dipy.align.imwarp import DiffeomorphicMap
  
          morph = vals["sdr_morph"]
          vals["sdr_morph"] = DiffeomorphicMap(None, [])
          vals["sdr_morph"].__dict__ = morph
      # Backward compat with when it used to be a list
      if isinstance(vals["vertices_to"], np.ndarray):
          vals["vertices_to"] = [vals["vertices_to"]]
      # Backward compat with when it used to be a single array
      if isinstance(vals["src_data"].get("inuse", None), np.ndarray):
          vals["src_data"]["inuse"] = [vals["src_data"]["inuse"]]
      # added with compute_vol_morph_mat in 0.22:
      vals["vol_morph_mat"] = vals.get("vol_morph_mat", None)
      return SourceMorph(**vals)
  
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 7 for calling a global function with example usage: read_source_morph(fname) and returns: SourceMorph