code: def _read_events(input_fname, info):
      """Read events for the record.
  
      Parameters
      ----------
      input_fname : path-like
          The file path.
      info : dict
          Header info array.
      """
      n_samples = info["last_samps"][-1]
      mff_events, event_codes = _read_mff_events(
          input_fname, info["sfreq"]
      )
      info["n_events"] = len(event_codes)
      info["event_codes"] = event_codes
      events = np.zeros(
          [info["n_events"], info["n_segments"] * n_samples]
      )
      for n, event in enumerate(event_codes):
          for i in mff_events[event]:
              if (i < 0) or (i >= events.shape[1]):
                  continue
              events[n][i] = n + 1
      return events, info
  
file_path: mne-python/mne/io/egi/events.py
imports: from datetime import datetime
  from glob import glob
  from os.path import basename, join, splitext
  import numpy
  from ...utils import _soft_import, logger
label_desc: Use image node_id 1 for calling a global function with example usage: _read_events(input_fname, info) and returns: events,  info