code: def test_plot_evoked_field(renderer):
      """Test plotting evoked field."""
      evoked = read_evokeds(
          evoked_fname, condition="Left Auditory", baseline=(-0.2, 0.0)
      )
      evoked.pick(evoked.ch_names[::10])  # speed
      for t, n_contours in zip(["meg", None], [21, 0]):
          with pytest.warns(RuntimeWarning, match="projection"):
              maps = make_field_map(
                  evoked,
                  trans_fname,
                  subject="sample",
                  subjects_dir=subjects_dir,
                  n_jobs=None,
                  ch_type=t,
              )
          evoked.plot_field(maps, time=0.1, n_contours=n_contours)
  
      # Test plotting inside an existing Brain figure.
      brain = Brain(
          "fsaverage", "lh", "inflated", subjects_dir=subjects_dir
      )
      fig = evoked.plot_field(maps, time=0.1, fig=brain)
  
      # Test some methods
      fig = evoked.plot_field(maps, time_viewer=True)
      assert isinstance(fig, EvokedField)
      fig._rescale()
      fig.set_time(0.05)
      assert fig._current_time == 0.05
      fig.set_contours(10)
      assert fig._n_contours == 10
      assert fig._widgets["contours"].get_value() == 10
      fig.set_vmax(2e-12, kind="meg")
      assert fig._surf_maps[1]["contours"][-1] == 2e-12
      assert (
          fig._widgets["vmax_slider_meg"].get_value()
          == DEFAULTS["scalings"]["grad"] * 2e-12
      )
  
      fig = evoked.plot_field(maps, time_viewer=False)
      assert isinstance(fig, Figure3D)
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib.colors import Colormap
  from matplotlib.figure import Figure
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import MixedSourceEstimate, SourceEstimate, convert_forward_solution, make_field_map, make_sphere_model, pick_info, pick_types, read_dipole, read_evokeds, read_forward_solution, read_trans, setup_volume_source_space, use_coil_def
  from mne._fiff._digitization import write_dig
  from mne._fiff.constants import FIFF
  from mne.bem import read_bem_solution, read_bem_surfaces
  from mne.datasets import testing
  from mne.defaults import DEFAULTS
  from mne.io import read_info, read_raw_bti, read_raw_ctf, read_raw_kit, read_raw_nirx
  from mne.minimum_norm import apply_inverse
  from mne.source_estimate import _BaseVolSourceEstimate
  from mne.source_space import read_source_spaces
  from mne.transforms import Transform
  from mne.utils import _record_warnings, catch_logging
  from mne.viz import Brain, EvokedField, Figure3D, link_brains, mne_analyze_colormap, plot_alignment, plot_brain_colorbar, plot_head_positions, plot_source_estimates, plot_sparse_source_estimates, snapshot_brain_montage
  from mne.viz._3d import _get_map_ticks, _linearize_map, _process_clim
  from mne.viz.utils import _fake_click, _fake_keypress, _fake_scroll, _get_cmap
label_desc: Use image node_id 3 for calling a global function with example usage: test_plot_evoked_field(renderer) without return types