code: def test_plot_topomap_interactive(layout):
      """Test interactive topomap projection plotting."""
      evoked = read_evokeds(evoked_fname, baseline=(None, 0))[0]
      evoked.pick(picks="mag")
      with evoked.info._unlock():
          evoked.info["projs"] = []
      assert not evoked.proj
      evoked.add_proj(compute_proj_evoked(evoked, n_mag=1))
  
      plt.close("all")
      fig, ax = plt.subplots(layout=layout)
      canvas = fig.canvas
  
      kwargs = dict(
          vlim=(-240, 240),
          times=[0.1],
          colorbar=False,
          axes=ax,
          res=8,
          time_unit="s",
      )
      evoked.copy().plot_topomap(proj=False, **kwargs)
      canvas.draw()
      image_noproj = np.array(canvas.buffer_rgba())
      assert len(plt.get_fignums()) == 1
  
      ax.clear()
      evoked.copy().plot_topomap(proj=True, **kwargs)
      canvas.draw()
      image_proj = np.array(canvas.buffer_rgba())
      assert not np.array_equal(image_noproj, image_proj)
      assert len(plt.get_fignums()) == 1
  
      ax.clear()
      fig = evoked.copy().plot_topomap(proj="interactive", **kwargs)
      canvas.draw()
      image_interactive = np.array(canvas.buffer_rgba())
      assert_array_equal(image_noproj, image_interactive)
      assert not np.array_equal(image_proj, image_interactive)
      assert len(plt.get_fignums()) == 2
  
      proj_fig = plt.figure(plt.get_fignums()[-1])
      assert _proj_status(fig, "matplotlib") == [False]
      _fake_click(proj_fig, proj_fig.axes[0], [0.5, 0.5], xform="ax")
      proj_fig.canvas.draw_idle()
      assert _proj_status(fig, "matplotlib") == [True]
      canvas.draw()
      image_interactive_click = np.array(canvas.buffer_rgba())
      corr = np.corrcoef(
          image_proj.ravel(), image_interactive_click.ravel()
      )[0, 1]
      assert 0.99 < corr <= 1
      corr = np.corrcoef(
          image_noproj.ravel(), image_interactive_click.ravel()
      )[0, 1]
      assert 0.85 < corr < 0.9
  
      _fake_click(proj_fig, proj_fig.axes[0], [0.5, 0.5], xform="ax")
      canvas.draw()
      image_interactive_click = np.array(canvas.buffer_rgba())
      corr = np.corrcoef(
          image_noproj.ravel(), image_interactive_click.ravel()
      )[0, 1]
      assert 0.99 < corr <= 1
      corr = np.corrcoef(
          image_proj.ravel(), image_interactive_click.ravel()
      )[0, 1]
      assert 0.85 < corr < 0.9
  
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 1 for calling a global function with example usage: test_plot_topomap_interactive(layout) without return types