code: def on_motion_notify(mpl_event):
      """Respond to matplotlib's mouse event.
  
      Publishes an MNE-Python TimeChange event. When the mouse goes out of bounds, the
      xdata will be None, which is a special case that needs to be handled.
      """
      if mpl_event.xdata is not None:
          publish(fig5, TimeChange(time=mpl_event.xdata))
  
imports: import matplotlib.pyplot
  import mne
  from mne.viz.ui_events import TimeChange, link, publish, subscribe
label_desc: Use image node_id 1 for calling a global function with example usage: on_motion_notify(mpl_event) without return types