code: def test_limits_and_resize():
      init_viewbox()
  
      # now lock aspect
      vb.setAspectLocked()
      # test limits + resize  (aspect ratio constraint has priority over limits
      win.resize(400, 400)
      app.processEvents()
      vb.setLimits(xMin=0, xMax=10, yMin=0, yMax=10)
      win.resize(800, 400)
      app.processEvents()
      w = vb.geometry().width()
      h = vb.geometry().height()
      view1 = QRectF(-5, 0, 20, 10)
      size1 = QRectF(0, h, w, -h)
      assertMapping(vb, view1, size1)
  
imports: import pytest
  import pyqtgraph
label_desc: Use image node_id 5 for calling a global function with example usage: test_limits_and_resize() without return types