code: def resize(self, nrows, ncols):
      if nrows == self.nrows and ncols == self.ncols:
          return
  
      self.nrows = nrows
      self.ncols = ncols
  
      # (nrows + 1) * (ncols + 1) vertices, (x, y)
      self.pointsarray.resize((nrows + 1) * (ncols + 1))
      points = self.pointsarray.instances()
      # points is a flattened list of a 2d array of
      # QPointF(s) of shape (nrows+1, ncols+1)
  
      # pre-create quads from those instances of QPointF(s).
      # store the quads as a flattened list of a 2d array
      # of polygons of shape (nrows, ncols)
      polys = []
      for r in range(nrows):
          for c in range(ncols):
              bl = points[(r + 0) * (ncols + 1) + (c + 0)]
              tl = points[(r + 0) * (ncols + 1) + (c + 1)]
              br = points[(r + 1) * (ncols + 1) + (c + 0)]
              tr = points[(r + 1) * (ncols + 1) + (c + 1)]
              poly = (bl, br, tr, tl)
              polys.append(poly)
      self.polys = polys
  
imports: import numpy
  from ..None import Qt, colormap
  from ..None import functions
  from ..Qt import QtCore, QtGui
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 2 for calling the QuadInstances obj's underlying member method code with example usage: obj.resize(nrows, ncols) without return types