code: def test_zoom_ratio_with_limits1():
      """Test zoom with both ratio and limits set"""
      vb = pg.ViewBox(lockAspect=1)
  
      # twice as wide as tall
      vb.setFixedHeight(10)
      vb.setFixedWidth(20)
  
      # set some limits
      vb.setLimits(xMin=-5, xMax=5, yMin=-5, yMax=5)
  
      # Try to zoom too tall
      testRange = pg.QtCore.QRect(0, 0, 6, 10)
      vb.setRange(testRange, padding=0)
  
      viewRange = vb.getState()["viewRange"]
      viewWidth = viewRange[0][1] - viewRange[0][0]
      viewHeight = viewRange[1][1] - viewRange[1][0]
  
      # Make sure our view is within limits and the proper aspect ratio
      assert viewRange[0][0] >= -5
      assert viewRange[0][1] <= 5
      assert viewRange[1][0] >= -5
      assert viewRange[1][1] <= 5
      assert viewWidth == 2 * viewHeight
  
file_path: pyqtgraph/tests/graphicsItems/ViewBox/test_ViewBoxZoom.py
imports: import pyqtgraph
label_desc: Use image node_id 6 for calling a global function with example usage: test_zoom_ratio_with_limits1() without return types