code: def test_plot_raw_groupby(raw, browser_backend, group_by):
      """Test group-by plotting of raw data."""
      with raw.info._unlock():
          raw.info[
              "lowpass"
          ] = 10.0  # allow heavy decim during plotting
      order = (
          np.arange(len(raw.ch_names))[::-3]
          if group_by == "position"
          else [1, 2, 4, 6]
      )
      fig = raw.plot(group_by=group_by, order=order)
      x = fig.mne.traces[0].get_xdata()[10]
      y = fig.mne.traces[0].get_ydata()[10]
      fig._fake_keypress("down")  # change selection
      fig._fake_click((x, y), xform="data")  # mark bad
      fig._fake_click(
          (0.5, 0.5), ax=fig.mne.ax_vscroll
      )  # change channels
      if browser_backend.name == "matplotlib":
          # Test lasso-selection
          # (test difficult with Qt-backend, set plot_raw_selection)
          sel_fig = fig.mne.fig_selection
          topo_ax = sel_fig.mne.sensor_ax
          fig._fake_click(
              [-0.425, 0.20223853],
              fig=sel_fig,
              ax=topo_ax,
              xform="data",
          )
          fig._fake_click(
              (-0.5, 0.0),
              add_points=[(0.5, 0.0), (0.5, 0.5), (-0.5, 0.5)],
              fig=sel_fig,
              ax=topo_ax,
              xform="data",
              kind="drag",
          )
          fig._fake_keypress("down")
          fig._fake_keypress("up")
      fig._fake_keypress("up")
      fig._fake_scroll(0.5, 0.5, -1)  # scroll down
      fig._fake_scroll(0.5, 0.5, 1)
  
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 18 for calling a global function with example usage: test_plot_raw_groupby(raw, browser_backend, group_by) without return types