code: def test_getViewWidget_deleted():
      view = pg.PlotWidget()
      item = pg.InfiniteLine()
      view.addItem(item)
      assert item.getViewWidget() is view
  
      # Arrange to have Qt automatically delete the view widget
      obj = pg.QtWidgets.QWidget()
      view.setParent(obj)
      del obj
  
      assert not pg.Qt.isQObjectAlive(view)
      assert item.getViewWidget() is None
  
imports: import faulthandler
  import weakref
  import pyqtgraph
label_desc: Use image node_id 2 for calling a global function with example usage: test_getViewWidget_deleted() without return types