code: def test_getViewWidget():
      view = pg.PlotWidget()
      vref = weakref.ref(view)
      item = pg.InfiniteLine()
      view.addItem(item)
      assert item.getViewWidget() is view
      del view
      assert vref() is None
      assert item.getViewWidget() is None
  
imports: import faulthandler
  import weakref
  import pyqtgraph
label_desc: Use image node_id 1 for calling a global function with example usage: test_getViewWidget() without return types