code: def test_MatplotlibExporter_nonplotitem():
      # attempting to export something other than a PlotItem raises an exception
      plt = pg.PlotWidget()
      plt.show()
      plt.plot([0, 1, 2], [2, 3, 4])
      exp = MatplotlibExporter(plt.getPlotItem().getViewBox())
      with pytest.raises(Exception):
          exp.export()
  
file_path: pyqtgraph/tests/exporters/test_matplotlib.py
imports: from importlib.metadata import version
  import pytest
  import pyqtgraph
  from pyqtgraph.exporters import MatplotlibExporter
  import matplotlib
label_desc: Use image node_id 2 for calling a global function with example usage: test_MatplotlibExporter_nonplotitem() without return types