code: def _get_mri_info_data(mri, data):
      # Read the segmentation data using nibabel
      if data:
          _import_nibabel("load MRI atlas data")
      out = dict()
      (
          _,
          out["vox_mri_t"],
          out["mri_ras_t"],
          dims,
          _,
          mgz,
      ) = _read_mri_info(mri, return_img=True)
      out.update(
          mri_width=dims[0],
          mri_height=dims[1],
          mri_depth=dims[1],
          mri_volume_name=mri,
      )
      if data:
          assert mgz is not None
          out["mri_vox_t"] = invert_transform(out["vox_mri_t"])
          out["data"] = np.asarray(mgz.dataobj)
      return out
  
imports: import os.path
  from gzip import GzipFile
  from pathlib import Path
  import numpy
  from ._fiff.constants import FIFF
  from ._fiff.meas_info import read_fiducials
  from .surface import _read_mri_surface, read_surface
  from .transforms import Transform, _ensure_trans, apply_trans, combine_transforms, invert_transform, read_ras_mni_t
  from .utils import _check_fname, _check_option, _import_nibabel, _validate_type, get_subjects_dir, logger, verbose
label_desc: Use image node_id 5 for calling a global function with example usage: _get_mri_info_data(mri, data) and returns: out