code: def test_plot_raw_keypresses(raw, browser_backend, monkeypatch):
      """Test keypress interactivity of plot_raw()."""
      with raw.info._unlock():
          raw.info[
              "lowpass"
          ] = 10.0  # allow heavy decim during plotting
      fig = raw.plot()
      # test twice → once in normal, once in butterfly view.
      # NB: keys a, j, and ? are tested in test_plot_raw_child_figures()
      keys = (
          "pagedown",
          "down",
          "up",
          "down",
          "right",
          "left",
          "-",
          "+",
          "=",
          "d",
          "d",
          "pageup",
          "home",
          "end",
          "z",
          "z",
          "s",
          "s",
          "f11",
          "t",
          "b",
      )
      # Avoid annoying fullscreen issues by monkey-patching our handlers
      _monkeypatch_fig(fig, browser_backend)
      # test for group_by='original'
      for key in 2 * keys + ("escape",):
          fig._fake_keypress(key)
      # test for group_by='selection'
      fig = plot_raw(raw, group_by="selection")
      _monkeypatch_fig(fig, browser_backend)
      for key in 2 * keys + ("escape",):
          fig._fake_keypress(key)
  
imports: import itertools
  import os
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib import backend_bases
  from numpy.testing import assert_allclose
  from mne import Annotations, create_info, pick_types
  from mne._fiff.pick import _DATA_CH_TYPES_ORDER_DEFAULT, _PICK_TYPES_DATA_DICT
  from mne.annotations import _sync_onset
  from mne.datasets import testing
  from mne.io import RawArray
  from mne.utils import _assert_no_instances, _dt_to_stamp, _record_warnings, check_version, get_config, set_config
  from mne.viz import plot_raw, plot_sensors
  from mne.viz.utils import _fake_click, _fake_keypress
label_desc: Use image node_id 16 for calling a global function with example usage: test_plot_raw_keypresses(raw, browser_backend, monkeypatch) without return types