code: def test_plot_evoked_reconstruct(picks, rlims, avg_proj):
      """Test proj="reconstruct"."""
      evoked = _get_epochs(picks=picks).average()
      if avg_proj:
          evoked.set_eeg_reference(projection=True).apply_proj()
          assert len(evoked.info["projs"]) == 1
          assert evoked.proj is True
      else:
          assert len(evoked.info["projs"]) == 0
          assert evoked.proj is False
      fig = evoked.plot(
          proj=True,
          hline=[1],
          exclude=[],
          window_title="foo",
          time_unit="s",
      )
      amplitudes = _get_amplitudes(fig)
      assert len(amplitudes) == len(picks)
      assert evoked.proj is avg_proj
  
      fig = evoked.plot(proj="reconstruct", exclude=[])
      amplitudes_recon = _get_amplitudes(fig)
      if avg_proj is False:
          assert_allclose(amplitudes, amplitudes_recon)
      proj = compute_proj_evoked(
          evoked.copy().crop(None, 0).apply_proj()
      )
      evoked.add_proj(proj)
      assert len(evoked.info["projs"]) == 2 if len(picks) == 3 else 4
      fig = evoked.plot(proj=True, exclude=[])
      amplitudes_proj = _get_amplitudes(fig)
      fig = evoked.plot(proj="reconstruct", exclude=[])
      amplitudes_recon = _get_amplitudes(fig)
      assert len(amplitudes_recon) == len(picks)
      norm = np.linalg.norm(amplitudes)
      norm_proj = np.linalg.norm(amplitudes_proj)
      norm_recon = np.linalg.norm(amplitudes_recon)
      r = np.dot(amplitudes_recon.ravel(), amplitudes.ravel()) / (
          norm_recon * norm
      )
      assert rlims[0] < r < rlims[1]
      assert 1.05 * norm_proj < norm_recon
      if not avg_proj:
          assert norm_proj < norm * 0.9
  
      cov = read_cov(cov_fname)
      with pytest.raises(
          ValueError, match='Cannot use proj="reconstruct"'
      ):
          evoked.plot(noise_cov=cov, proj="reconstruct")
      plt.close("all")
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib import gridspec
  from matplotlib.collections import PolyCollection
  from matplotlib.colors import same_color
  from mpl_toolkits.axes_grid1.parasite_axes import HostAxes
  from numpy.testing import assert_allclose
  import mne
  from mne import Epochs, compute_covariance, compute_proj_evoked, make_fixed_length_events, read_cov, read_events
  from mne._fiff.constants import FIFF
  from mne.datasets import testing
  from mne.io import read_raw_fif
  from mne.stats.parametric import _parametric_ci
  from mne.utils import catch_logging
  from mne.viz import plot_compare_evokeds, plot_evoked_white
  from mne.viz.utils import _fake_click, _get_cmap
label_desc: Use image node_id 7 for calling a global function with example usage: test_plot_evoked_reconstruct(picks, rlims, avg_proj) without return types