code: def test_plot_joint():
      """Test joint plot."""
      evoked = _get_epochs().average()
      evoked.plot_joint(
          ts_args=dict(time_unit="s"), topomap_args=dict(time_unit="s")
      )
  
      def return_inds(
          d,
      ):  # to test function kwarg to zorder arg of evoked.plot
          return list(range(d.shape[0]))
  
      evoked.plot_joint(
          title="test",
          topomap_args=dict(contours=0, res=8, time_unit="ms"),
          ts_args=dict(
              spatial_colors=True, zorder=return_inds, time_unit="s"
          ),
      )
      with pytest.raises(ValueError, match="If one of `ts_args` and"):
          evoked.plot_joint(ts_args=dict(axes=True, time_unit="s"))
  
      axes = plt.subplots(nrows=3)[-1].flatten().tolist()
      evoked.plot_joint(
          times=[0],
          picks=[6, 7, 8],
          ts_args=dict(axes=axes[0]),
          topomap_args={"axes": axes[1:], "time_unit": "s"},
      )
      with pytest.raises(ValueError, match="of length 4"):
          evoked.plot_joint(
              picks=[6, 7, 8],
              ts_args=dict(axes=axes[0]),
              topomap_args=dict(axes=axes[2:]),
          )
      plt.close("all")
  
      # test proj options
      assert len(evoked.info["projs"]) == 0
      evoked.pick(picks="meg")
      evoked.add_proj(
          compute_proj_evoked(evoked, n_mag=1, n_grad=1, meg="combined")
      )
      assert len(evoked.info["projs"]) == 1
      with pytest.raises(ValueError, match="must match ts_args"):
          evoked.plot_joint(
              ts_args=dict(proj=True), topomap_args=dict(proj=False)
          )
      evoked.plot_joint(
          ts_args=dict(proj="reconstruct"),
          topomap_args=dict(proj="reconstruct"),
      )
      plt.close("all")
  
      # test sEEG (gh:8733)
      evoked.del_proj().pick("mag")  # avoid overlapping positions error
      mapping = {ch_name: "seeg" for ch_name in evoked.ch_names}
      evoked.set_channel_types(mapping, on_unit_change="ignore")
      evoked.plot_joint()
  
      # test DBS (gh:8739)
      evoked = _get_epochs().average().pick("mag")
      mapping = {ch_name: "dbs" for ch_name in evoked.ch_names}
      evoked.set_channel_types(mapping, on_unit_change="ignore")
      evoked.plot_joint()
      plt.close("all")
  
imports: from collections import namedtuple
  from pathlib import Path
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pytest
  from mne import Epochs, compute_proj_evoked, read_cov, read_events
  from mne.channels import read_layout
  from mne.io import read_raw_fif
  from mne.time_frequency.tfr import AverageTFR
  from mne.utils import _record_warnings
  from mne.viz import _get_presser, mne_analyze_colormap, plot_evoked_topo, plot_topo_image_epochs
  from mne.viz.evoked import _line_plot_onselect
  from mne.viz.topo import _imshow_tfr, _plot_update_evoked_topo_proj, iter_topography
  from mne.viz.utils import _fake_click
label_desc: Use image node_id 5 for calling a global function with example usage: test_plot_joint() and returns: list