code: def test_plot_tfr_topomap():
      """Test plotting of TFR data."""
      raw = read_raw_fif(raw_fname)
      times = np.linspace(-0.1, 0.1, 200)
      res = 8
      n_freqs = 3
      nave = 1
      rng = np.random.RandomState(42)
      picks = [
          93,
          94,
          96,
          97,
          21,
          22,
          24,
          25,
          129,
          130,
          315,
          316,
          2,
          5,
          8,
          11,
      ]
      info = pick_info(raw.info, picks)
      data = rng.randn(len(picks), n_freqs, len(times))
  
      # test complex numbers
      tfr = AverageTFR(
          info, data * (1 + 1j), times, np.arange(n_freqs), nave
      )
      tfr.plot_topomap(
          ch_type="mag",
          tmin=0.05,
          tmax=0.150,
          fmin=0,
          fmax=10,
          res=res,
          contours=0,
      )
  
      # test real numbers
      tfr = AverageTFR(info, data, times, np.arange(n_freqs), nave)
      tfr.plot_topomap(
          ch_type="mag",
          tmin=0.05,
          tmax=0.150,
          fmin=0,
          fmax=10,
          res=res,
          contours=0,
      )
  
      eclick = matplotlib.backend_bases.MouseEvent(
          "button_press_event", plt.gcf().canvas, 0, 0, 1
      )
      eclick.xdata = eclick.ydata = 0.1
      eclick.inaxes = plt.gca()
      erelease = matplotlib.backend_bases.MouseEvent(
          "button_release_event", plt.gcf().canvas, 0.9, 0.9, 1
      )
      erelease.xdata = 0.3
      erelease.ydata = 0.2
      pos = np.array(
          [[0.11, 0.11], [0.25, 0.5], [0.0, 0.2], [0.2, 0.39]]
      )
      _onselect(
          eclick,
          erelease,
          tfr,
          pos,
          "grad",
          1,
          3,
          1,
          3,
          "RdBu_r",
          list(),
      )
      _onselect(
          eclick,
          erelease,
          tfr,
          pos,
          "mag",
          1,
          3,
          1,
          3,
          "RdBu_r",
          list(),
      )
      eclick.xdata = eclick.ydata = 0.0
      erelease.xdata = erelease.ydata = 0.9
      tfr._onselect(eclick, erelease, None, "mean", None)
      plt.close("all")
  
      # test plot_psds_topomap
      info = raw.info.copy()
      chan_inds = channel_indices_by_type(info)
      info = pick_info(info, chan_inds["grad"][:4])
  
      fig, axes = plt.subplots()
      freqs = np.arange(3.0, 9.5)
      bands = [(4, 8, "Theta")]
      psd = np.random.rand(len(info["ch_names"]), freqs.shape[0])
      plot_psds_topomap(psd, freqs, info, bands=bands, axes=[axes])
  
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 11 for calling a global function with example usage: test_plot_tfr_topomap() without return types