We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
montage_sgskip.py example doesn't run
When trying to run the example in `examples/visualization/montage_sgskip.py`, I get an exception:

```python
ValueError: A head<->mri transformation matrix (trans) is required to plot head surfaces in head coordinates, `trans=None` is not allowed
```
It runs if I pass `trans='fsaverage'` but I'm not sure this is how this example intended to behave (as the BEM is based on a sphere here).

@agramfort care to take a look?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/visualization/montage_sgskip.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 .. _plot_montage:
4 
5 Plotting sensor layouts of EEG systems
6 ======================================
7 
8 This example illustrates how to load all the EEG system montages
9 shipped in MNE-python, and display it on the fsaverage template subject.
10 """  # noqa: D205, D400
11 # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
12 #          Joan Massich <mailsik@gmail.com>
13 #
14 # License: BSD-3-Clause
15 
16 # %%
17 
18 import os.path as op
19 
20 import mne
21 from mne.channels.montage import get_builtin_montages
22 from mne.datasets import fetch_fsaverage
23 from mne.viz import set_3d_title, set_3d_view
24 
25 
26 # %%
27 # Check all montages against a sphere
28 
29 for current_montage in get_builtin_montages():
30     montage = mne.channels.make_standard_montage(current_montage)
31     info = mne.create_info(
32         ch_names=montage.ch_names, sfreq=100., ch_types='eeg')
33     info.set_montage(montage)
34     sphere = mne.make_sphere_model(r0='auto', head_radius='auto', info=info)
35     fig = mne.viz.plot_alignment(
36         # Plot options
37         show_axes=True, dig='fiducials', surfaces='head',
38         bem=sphere, info=info)
39     set_3d_view(figure=fig, azimuth=135, elevation=80)
40     set_3d_title(figure=fig, title=current_montage)
41 
42 
43 # %%
44 # Check all montages against fsaverage
45 
46 subjects_dir = op.dirname(fetch_fsaverage())
47 
48 for current_montage in get_builtin_montages():
49     montage = mne.channels.make_standard_montage(current_montage)
50     # Create dummy info
51     info = mne.create_info(
52         ch_names=montage.ch_names, sfreq=100., ch_types='eeg')
53     info.set_montage(montage)
54     fig = mne.viz.plot_alignment(
55         # Plot options
56         show_axes=True, dig='fiducials', surfaces='head', mri_fiducials=True,
57         subject='fsaverage', subjects_dir=subjects_dir, info=info,
58         coord_frame='mri',
59         trans='fsaverage',  # transform from head coords to fsaverage's MRI
60     )
61     set_3d_view(figure=fig, azimuth=135, elevation=80)
62     set_3d_title(figure=fig, title=current_montage)
63
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py
--- a/examples/visualization/montage_sgskip.py
+++ b/examples/visualization/montage_sgskip.py
@@ -16,6 +16,7 @@
 # %%
 
 import os.path as op
+import numpy as np
 
 import mne
 from mne.channels.montage import get_builtin_montages
@@ -35,6 +36,7 @@
     fig = mne.viz.plot_alignment(
         # Plot options
         show_axes=True, dig='fiducials', surfaces='head',
+        trans=mne.Transform("head", "mri", trans=np.eye(4)),  # identity
         bem=sphere, info=info)
     set_3d_view(figure=fig, azimuth=135, elevation=80)
     set_3d_title(figure=fig, title=current_montage)

{"golden_diff": "diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py\n--- a/examples/visualization/montage_sgskip.py\n+++ b/examples/visualization/montage_sgskip.py\n@@ -16,6 +16,7 @@\n # %%\n \n import os.path as op\n+import numpy as np\n \n import mne\n from mne.channels.montage import get_builtin_montages\n@@ -35,6 +36,7 @@\n     fig = mne.viz.plot_alignment(\n         # Plot options\n         show_axes=True, dig='fiducials', surfaces='head',\n+        trans=mne.Transform(\"head\", \"mri\", trans=np.eye(4)),  # identity\n         bem=sphere, info=info)\n     set_3d_view(figure=fig, azimuth=135, elevation=80)\n     set_3d_title(figure=fig, title=current_montage)\n", "issue": "montage_sgskip.py example doesn't run\nWhen trying to run the example in `examples/visualization/montage_sgskip.py`, I get an exception:\r\n\r\n```python\r\nValueError: A head<->mri transformation matrix (trans) is required to plot head surfaces in head coordinates, `trans=None` is not allowed\r\n```\r\nIt runs if I pass `trans='fsaverage'` but I'm not sure this is how this example intended to behave (as the BEM is based on a sphere here).\r\n\r\n@agramfort care to take a look?\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. _plot_montage:\n\nPlotting sensor layouts of EEG systems\n======================================\n\nThis example illustrates how to load all the EEG system montages\nshipped in MNE-python, and display it on the fsaverage template subject.\n\"\"\"  # noqa: D205, D400\n# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n#          Joan Massich <mailsik@gmail.com>\n#\n# License: BSD-3-Clause\n\n# %%\n\nimport os.path as op\n\nimport mne\nfrom mne.channels.montage import get_builtin_montages\nfrom mne.datasets import fetch_fsaverage\nfrom mne.viz import set_3d_title, set_3d_view\n\n\n# %%\n# Check all montages against a sphere\n\nfor current_montage in get_builtin_montages():\n    montage = mne.channels.make_standard_montage(current_montage)\n    info = mne.create_info(\n        ch_names=montage.ch_names, sfreq=100., ch_types='eeg')\n    info.set_montage(montage)\n    sphere = mne.make_sphere_model(r0='auto', head_radius='auto', info=info)\n    fig = mne.viz.plot_alignment(\n        # Plot options\n        show_axes=True, dig='fiducials', surfaces='head',\n        bem=sphere, info=info)\n    set_3d_view(figure=fig, azimuth=135, elevation=80)\n    set_3d_title(figure=fig, title=current_montage)\n\n\n# %%\n# Check all montages against fsaverage\n\nsubjects_dir = op.dirname(fetch_fsaverage())\n\nfor current_montage in get_builtin_montages():\n    montage = mne.channels.make_standard_montage(current_montage)\n    # Create dummy info\n    info = mne.create_info(\n        ch_names=montage.ch_names, sfreq=100., ch_types='eeg')\n    info.set_montage(montage)\n    fig = mne.viz.plot_alignment(\n        # Plot options\n        show_axes=True, dig='fiducials', surfaces='head', mri_fiducials=True,\n        subject='fsaverage', subjects_dir=subjects_dir, info=info,\n        coord_frame='mri',\n        trans='fsaverage',  # transform from head coords to fsaverage's MRI\n    )\n    set_3d_view(figure=fig, azimuth=135, elevation=80)\n    set_3d_title(figure=fig, title=current_montage)\n", "path": "examples/visualization/montage_sgskip.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. _plot_montage:\n\nPlotting sensor layouts of EEG systems\n======================================\n\nThis example illustrates how to load all the EEG system montages\nshipped in MNE-python, and display it on the fsaverage template subject.\n\"\"\"  # noqa: D205, D400\n# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n#          Joan Massich <mailsik@gmail.com>\n#\n# License: BSD-3-Clause\n\n# %%\n\nimport os.path as op\nimport numpy as np\n\nimport mne\nfrom mne.channels.montage import get_builtin_montages\nfrom mne.datasets import fetch_fsaverage\nfrom mne.viz import set_3d_title, set_3d_view\n\n\n# %%\n# Check all montages against a sphere\n\nfor current_montage in get_builtin_montages():\n    montage = mne.channels.make_standard_montage(current_montage)\n    info = mne.create_info(\n        ch_names=montage.ch_names, sfreq=100., ch_types='eeg')\n    info.set_montage(montage)\n    sphere = mne.make_sphere_model(r0='auto', head_radius='auto', info=info)\n    fig = mne.viz.plot_alignment(\n        # Plot options\n        show_axes=True, dig='fiducials', surfaces='head',\n        trans=mne.Transform(\"head\", \"mri\", trans=np.eye(4)),  # identity\n        bem=sphere, info=info)\n    set_3d_view(figure=fig, azimuth=135, elevation=80)\n    set_3d_title(figure=fig, title=current_montage)\n\n\n# %%\n# Check all montages against fsaverage\n\nsubjects_dir = op.dirname(fetch_fsaverage())\n\nfor current_montage in get_builtin_montages():\n    montage = mne.channels.make_standard_montage(current_montage)\n    # Create dummy info\n    info = mne.create_info(\n        ch_names=montage.ch_names, sfreq=100., ch_types='eeg')\n    info.set_montage(montage)\n    fig = mne.viz.plot_alignment(\n        # Plot options\n        show_axes=True, dig='fiducials', surfaces='head', mri_fiducials=True,\n        subject='fsaverage', subjects_dir=subjects_dir, info=info,\n        coord_frame='mri',\n        trans='fsaverage',  # transform from head coords to fsaverage's MRI\n    )\n    set_3d_view(figure=fig, azimuth=135, elevation=80)\n    set_3d_title(figure=fig, title=current_montage)\n", "path": "examples/visualization/montage_sgskip.py"}]}