code: def test_auto_scale():
      """Test auto-scaling of channels for quick plotting."""
      raw = read_raw_fif(raw_fname)
      epochs = Epochs(raw, read_events(ev_fname))
      rand_data = np.random.randn(10, 100)
  
      for inst in [raw, epochs]:
          scale_grad = 1e10
          scalings_def = dict(
              [("eeg", "auto"), ("grad", scale_grad), ("stim", "auto")]
          )
  
          # Test for wrong inputs
          with pytest.raises(ValueError, match=r".*scalings.*'foo'.*"):
              inst.plot(scalings="foo")
  
          # Make sure compute_scalings doesn't change anything not auto
          scalings_new = _compute_scalings(scalings_def, inst)
          assert scale_grad == scalings_new["grad"]
          assert scalings_new["eeg"] != "auto"
  
      with pytest.raises(
          ValueError, match="Must supply either Raw or Epochs"
      ):
          _compute_scalings(scalings_def, rand_data)
      epochs = epochs[0].load_data()
      epochs.pick(picks="eeg")
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from mne import read_evokeds
  from mne.epochs import Epochs
  from mne.event import read_events
  from mne.io import read_raw_fif
  from mne.viz import ClickableImage, add_background_image, mne_analyze_colormap
  from mne.viz.ui_events import ColormapRange, link, subscribe
  from mne.viz.utils import _compute_scalings, _fake_click, _fake_keypress, _fake_scroll, _get_color_list, _make_event_color_dict, _setup_vmin_vmax, _validate_if_list_of_axes, centers_to_edges, compare_fiff, concatenate_images
label_desc: Use image node_id 7 for calling a global function with example usage: test_auto_scale() without return types