code: def test_plot_montage():
      """Test plotting montages."""
      m = make_standard_montage("easycap-M1")
      m.plot()
      plt.close("all")
      m.plot(kind="3d")
      plt.close("all")
      m.plot(kind="3d", show_names=True)
      plt.close("all")
      m.plot(kind="topomap")
      plt.close("all")
      m.plot(kind="topomap", show_names=True)
      plt.close("all")
      m.plot(sphere="eeglab")
      plt.close("all")
  
      N_HSP, N_HPI = 2, 1
      montage = make_dig_montage(
          nasion=[1, 1, 1],
          lpa=[2, 2, 2],
          rpa=[3, 3, 3],
          hsp=np.full((N_HSP, 3), 4),
          hpi=np.full((N_HPI, 3), 4),
          coord_frame="head",
      )
      assert "0 channels" in repr(montage)
      with pytest.raises(
          RuntimeError, match="No valid channel positions"
      ):
          montage.plot()
      d = read_dig_fif(fname=fif_fname)
      assert "61 channels" in repr(d)
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from mne.channels import make_dig_montage, make_standard_montage, read_dig_fif
label_desc: Use image node_id 1 for calling a global function with example usage: test_plot_montage() without return types