code: def _coord_frame_const(coord_frame):
      from ..transforms import _str_to_frame
  
      if (
          not isinstance(coord_frame, str)
          or coord_frame not in _str_to_frame
      ):
          raise ValueError(
              f"coord_frame must be one of {sorted(_str_to_frame.keys())}, got "
              f"{coord_frame}"
          )
      return _str_to_frame[coord_frame]
  
imports: import heapq
  from collections import Counter
  import numpy
  from ..utils import Bunch, _check_fname, _validate_type, logger, verbose, warn
  from .constants import FIFF, _coord_frame_named
  from .tag import read_tag
  from .tree import dir_tree_find
  from .write import start_and_end_file, write_dig_points
label_desc: Use image node_id 9 for calling a global function with example usage: _coord_frame_const(coord_frame) and returns: _str_to_frame