code: def test_zoom_ratio2():
      """Slightly more complicated zoom ratio test, where the view box shape does not match the ratio"""
      vb = pg.ViewBox(lockAspect=1)
  
      # twice as wide as tall
      vb.setFixedHeight(10)
      vb.setFixedWidth(20)
  
      # more or less random requested range
      testRange = pg.QtCore.QRect(0, 0, 10, 15)
      vb.setRange(testRange, padding=0)
  
      viewRange = vb.getState()["viewRange"]
      viewWidth = viewRange[0][1] - viewRange[0][0]
      viewHeight = viewRange[1][1] - viewRange[1][0]
  
      # View width should be twice as wide as the height,
      # since the viewbox is twice as wide as it is tall.
      assert viewWidth == 2 * viewHeight
  
file_path: pyqtgraph/tests/graphicsItems/ViewBox/test_ViewBoxZoom.py
imports: import pyqtgraph
label_desc: Use image node_id 5 for calling a global function with example usage: test_zoom_ratio2() without return types