code: def _get_res4_info_needed_by_markers(directory):
      """Get required information from CTF res4 information file."""
      # we only need a few values from res4. Maybe we can read them directly
      # instead of parsing the entire res4 file.
      res4 = _read_res4(directory)
  
      total_offset_duration = res4["pre_trig_pts"] / res4["sfreq"]
      trial_duration = res4["nsamp"] / res4["sfreq"]
  
      meas_date = (
          _convert_time(res4["data_date"], res4["data_time"]),
          0,
      )
      return total_offset_duration, trial_duration, meas_date
  
file_path: mne-python/mne/io/ctf/markers.py
imports: import os.path
  from io import BytesIO
  import numpy
  from ...annotations import Annotations
  from .info import _convert_time
  from .res4 import _read_res4
label_desc: Use image node_id 2 for calling a global function with example usage: _get_res4_info_needed_by_markers(directory) and returns: total_offset_duration,  trial_duration,  meas_date