code: def assert_widget_fields(mplw, parent, figsize, dpi):
      assert mplw.parent() == parent
      assert np.allclose(mplw.getFigure().get_size_inches(), figsize)
      assert mplw.getFigure().dpi == dpi
  
file_path: pyqtgraph/tests/widgets/test_matplotlibwidget.py
imports: from importlib.metadata import version
  import numpy
  import pytest
  import pyqtgraph
  from pyqtgraph.Qt import QtWidgets
  from pyqtgraph.widgets.MatplotlibWidget import MatplotlibWidget
label_desc: Use image node_id 1 for calling a global function with example usage: assert_widget_fields(mplw, parent, figsize, dpi) without return types