code: def init_viewbox():
      """Helper function to init the ViewBox"""
      global win, vb
  
      win = pg.GraphicsLayoutWidget()
      win.ci.layout.setContentsMargins(0, 0, 0, 0)
      win.resize(200, 200)
      win.show()
      vb = win.addViewBox()
  
      # set range before viewbox is shown
      vb.setRange(xRange=[0, 10], yRange=[0, 10], padding=0)
  
      # required to make mapFromView work properly.
      qtest.qWaitForWindowExposed(win)
  
      g = pg.GridItem()
      vb.addItem(g)
      app.processEvents()
  
imports: import pytest
  import pyqtgraph
label_desc: Use image node_id 2 for calling a global function with example usage: init_viewbox() without return types