code: def test_show_old_global_api(monkeypatch):
      mpl_test_backend = SimpleNamespace(**vars(backend_template))
      mock_show = MagicMock()
      monkeypatch.setattr(
          mpl_test_backend, "show", mock_show, raising=False
      )
      monkeypatch.setitem(
          sys.modules, "mpl_test_backend", mpl_test_backend
      )
      mpl.use("module://mpl_test_backend")
      plt.show()
      mock_show.assert_called_with()
  
file_path: matplotlib/lib/matplotlib/tests/test_backend_template.py
imports: import sys
  from types import SimpleNamespace
  from unittest.mock import MagicMock
  import matplotlib
  from matplotlib import pyplot
  from matplotlib.backends import backend_template
  from matplotlib.backends.backend_template import FigureCanvasTemplate, FigureManagerTemplate
label_desc: Use image node_id 4 for calling a global function with example usage: test_show_old_global_api(monkeypatch) without return types