code: def _get_skull_surface(
      surf, subject, subjects_dir, bem=None, verbose=None
  ):
      """Get a skull surface from the Freesurfer subject directory.
  
      Parameters
      ----------
      surf : str
          The name of the surface 'outer' or 'inner'.
      %(subject)s
      %(subjects_dir)s
      bem : mne.bem.ConductorModel | None
          The conductor model that stores information about the skull surface.
      %(verbose)s
  
      Returns
      -------
      skull_surf : dict | None
          A dictionary with keys 'rr', 'tris', 'ntri', 'use_tris', 'np'
          and 'coord_frame' that store information for mesh plotting and other
          useful information about the head surface.
  
      Notes
      -----
      .. versionadded: 0.24
      """
      from .bem import _bem_find_surface
  
      if bem is not None:
          try:
              return _bem_find_surface(bem, surf + "_skull")
          except RuntimeError:
              logger.info(
                  "Could not find the surface for "
                  "skull in the provided BEM model, "
                  "looking in the subject directory."
              )
      subjects_dir = Path(
          get_subjects_dir(subjects_dir, raise_error=True)
      )
      fname = _check_fname(
          subjects_dir / subject / "bem" / (surf + "_skull.surf"),
          overwrite="read",
          must_exist=True,
          name=f"{surf} skull surface",
      )
      return _read_mri_surface(fname)
  
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 23 for calling a global function with example usage: _get_skull_surface(surf, subject, subjects_dir, bem, verbose) and returns: _read_mri_surface, _bem_find_surface