code: def _get_event_lines_and_texts(fig):
      """Get event lines and labels (helper function)."""
      lines = fig.mne.event_lines
      texts = fig.mne.event_texts
      if hasattr(lines, "get_segments"):  # matplotlib backend
          lines = lines.get_segments()
          texts = [t.get_text() for t in texts]
      return lines, texts
  
imports: import platform
  import matplotlib.pyplot
  import numpy
  import pytest
  from mne import Epochs, EpochsArray, create_info
  from mne.datasets import testing
  from mne.event import make_fixed_length_events
  from mne.viz import plot_drop_log
label_desc: Use image node_id 8 for calling a global function with example usage: _get_event_lines_and_texts(fig) and returns: lines,  texts