code: def test_plot_evoked_topomap_errors(evoked, monkeypatch):
      """Test error handling for evoked topomap plots."""
      # simplify data and set some params to make the test really fast
      evoked.pick(["EEG 001", "EEG 002"])
      fast_func = partial(
          evoked.plot_topomap, res=8, contours=0, sensors=False
      )
      fast_func_onetime = partial(fast_func, times=0.1)
      # wrong channel type
      with pytest.raises(ValueError, match="No channels of type 'mag'"):
          fast_func(ch_type="mag")
      # bad times
      with pytest.raises(
          ValueError, match="Times should be between 0.0 and"
      ):
          fast_func(times=[-100])
      with pytest.raises(
          ValueError, match="times must be 1D, got 2 dimensions"
      ):
          fast_func(times=[[0]])
      # times / average mismatch
      with pytest.raises(
          ValueError, match="3 time points.*2 periods for aver"
      ):
          fast_func(
              [0.05, 0.1, 0.15], ch_type="eeg", average=[0.01, 0.02]
          )
      # average
      with pytest.raises(
          ValueError, match="number of seconds.* got -1000.0"
      ):
          fast_func_onetime(average=-1e3)
      with pytest.raises(
          TypeError, match="number of seconds.* got type:"
      ):
          fast_func_onetime(average="x")
      # image_interp
      with pytest.raises(RuntimeError, match="`image_interp` must be"):
          fast_func_onetime(image_interp="bilinear")
      # border
      with pytest.raises(
          TypeError, match="be an instance of numeric or str"
      ):
          fast_func_onetime(extrapolate="head", border=[1, 2, 3])
      with pytest.raises(
          ValueError, match="allowed value.*'mean'.*got 'fancy'"
      ):
          fast_func_onetime(extrapolate="head", border="fancy")
      # projs
      with pytest.raises(
          RuntimeError, match="Projs are already applied."
      ):
          fast_func_onetime(proj="interactive")
      # too many subplots
      with monkeypatch.context() as m:  # speed it up by not actually plotting
          m.setattr(
              topomap,
              "_plot_topomap",
              lambda *args, **kwargs: (None, None, None),
          )
          with pytest.warns(
              RuntimeWarning, match="More than 25 topomaps plots"
          ):
              fast_func([0.1] * 26, colorbar=False)
      # missing channel locations
      with evoked.info._unlock():
          for ch in evoked.info["chs"]:
              ch["loc"][:3] = 0.0
      with pytest.raises(
          ValueError, match="points.*doesn't match.*channels."
      ):
          evoked.plot_topomap()
      with evoked.info._unlock():
          evoked.info["dig"] = None
      with pytest.raises(
          RuntimeError, match="No digitization points found."
      ):
          evoked.plot_topomap()
  
imports: from functools import partial
  from pathlib import Path
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib.patches import Circle
  from numpy.testing import assert_almost_equal, assert_array_equal, assert_equal
  from mne import Epochs, EvokedArray, Projection, compute_proj_evoked, compute_proj_raw, create_info, find_layout, make_fixed_length_events, pick_types, read_cov, read_evokeds, read_proj
  from mne._fiff.compensator import get_current_comp
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _picks_to_idx, channel_indices_by_type, pick_info
  from mne._fiff.proj import make_eeg_average_ref_proj
  from mne.channels import find_ch_adjacency, make_dig_montage, make_standard_montage, read_layout
  from mne.datasets import testing
  from mne.io import RawArray, read_info, read_raw_fif
  from mne.preprocessing import compute_bridged_electrodes
  from mne.time_frequency.tfr import AverageTFR
  from mne.viz import plot_evoked_topomap, plot_projs_topomap, topomap
  from mne.viz.tests.test_raw import _proj_status
  from mne.viz.topomap import _get_pos_outlines, _onselect, plot_arrowmap, plot_bridged_electrodes, plot_ch_adjacency, plot_psds_topomap, plot_topomap
  from mne.viz.utils import _fake_click, _fake_keypress, _fake_scroll, _find_peaks
label_desc: Use image node_id 6 for calling a global function with example usage: test_plot_evoked_topomap_errors(evoked, monkeypatch) without return types