code: def _read_morph_map(fname, subject_from, subject_to):
      """Read a morph map from disk."""
      f, tree, _ = fiff_open(fname)
      with f as fid:
          # Locate all maps
          maps = dir_tree_find(tree, FIFF.FIFFB_MNE_MORPH_MAP)
          if len(maps) == 0:
              raise ValueError("Morphing map data not found")
  
          # Find the correct ones
          left_map = None
          right_map = None
          for m in maps:
              tag = find_tag(fid, m, FIFF.FIFF_MNE_MORPH_MAP_FROM)
              if tag.data == subject_from:
                  tag = find_tag(fid, m, FIFF.FIFF_MNE_MORPH_MAP_TO)
                  if tag.data == subject_to:
                      #  Names match: which hemishere is this?
                      tag = find_tag(fid, m, FIFF.FIFF_MNE_HEMI)
                      if tag.data == FIFF.FIFFV_MNE_SURF_LEFT_HEMI:
                          tag = find_tag(
                              fid, m, FIFF.FIFF_MNE_MORPH_MAP
                          )
                          left_map = tag.data
                          logger.info("    Left-hemisphere map read.")
                      elif tag.data == FIFF.FIFFV_MNE_SURF_RIGHT_HEMI:
                          tag = find_tag(
                              fid, m, FIFF.FIFF_MNE_MORPH_MAP
                          )
                          right_map = tag.data
                          logger.info("    Right-hemisphere map read.")
  
      if left_map is None or right_map is None:
          raise ValueError(
              "Could not find both hemispheres in %s" % fname
          )
  
      return left_map, right_map
  
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 2 for calling a global function with example usage: _read_morph_map(fname, subject_from, subject_to) and returns: left_map,  right_map