code: def _write_morph_map(fname, subject_from, subject_to, mmap_1, mmap_2):
      """Write a morph map to disk."""
      try:
          with start_and_end_file(fname) as fid:
              _write_morph_map_(
                  fid, subject_from, subject_to, mmap_1, mmap_2
              )
      except Exception as exp:
          warn(
              'Could not write morph-map file "%s" (error: %s)'
              % (fname, exp)
          )
  
file_path: mne-python/mne/morph_map.py
imports: import os
  import numpy
  from scipy.sparse import csr_matrix, eye
  from ._fiff.constants import FIFF
  from ._fiff.open import fiff_open
  from ._fiff.tag import find_tag
  from ._fiff.tree import dir_tree_find
  from ._fiff.write import end_block, start_and_end_file, start_block, write_float_sparse_rcs, write_int, write_string
  from .surface import _compute_nearest, _find_nearest_tri_pts, _get_tri_supp_geom, _normalize_vectors, _triangle_neighbors, read_surface
  from .utils import get_subjects_dir, logger, verbose, warn
label_desc: Use image node_id 3 for calling a global function with example usage: _write_morph_map(fname, subject_from, subject_to, mmap_1, mmap_2) without return types