code: def calc_delta(self):
      w = np.zeros(self.pt_count, dtype=np.float32)
  
      if self.pt_count < 2:
          return
  
      i = 0
      while 1:
          if self.dst_w <= i < self.dst_w + self.grid_size - 1:
              i = self.dst_w - 1
          elif i >= self.dst_w:
              break
  
          j = 0
          while 1:
              if self.dst_h <= j < self.dst_h + self.grid_size - 1:
                  j = self.dst_h - 1
              elif j >= self.dst_h:
                  break
  
              sw = 0
              swp = np.zeros(2, dtype=np.float32)
              swq = np.zeros(2, dtype=np.float32)
              new_pt = np.zeros(2, dtype=np.float32)
              cur_pt = np.array([i, j], dtype=np.float32)
  
              k = 0
              for k in range(self.pt_count):
                  if (
                      i == self.dst_pts[k][0]
                      and j == self.dst_pts[k][1]
                  ):
                      break
  
                  w[k] = 1.0 / (
                      (i - self.dst_pts[k][0])
                      * (i - self.dst_pts[k][0])
                      + (j - self.dst_pts[k][1])
                      * (j - self.dst_pts[k][1])
                  )
  
                  sw += w[k]
                  swp = swp + w[k] * np.array(self.dst_pts[k])
                  swq = swq + w[k] * np.array(self.src_pts[k])
  
              if k == self.pt_count - 1:
                  pstar = 1 / sw * swp
                  qstar = 1 / sw * swq
  
                  miu_s = 0
                  for k in range(self.pt_count):
                      if (
                          i == self.dst_pts[k][0]
                          and j == self.dst_pts[k][1]
                      ):
                          continue
                      pt_i = self.dst_pts[k] - pstar
                      miu_s += w[k] * np.sum(pt_i * pt_i)
  
                  cur_pt -= pstar
                  cur_pt_j = np.array([-cur_pt[1], cur_pt[0]])
  
                  for k in range(self.pt_count):
                      if (
                          i == self.dst_pts[k][0]
                          and j == self.dst_pts[k][1]
                      ):
                          continue
  
                      pt_i = self.dst_pts[k] - pstar
                      pt_j = np.array([-pt_i[1], pt_i[0]])
  
                      tmp_pt = np.zeros(2, dtype=np.float32)
                      tmp_pt[0] = (
                          np.sum(pt_i * cur_pt) * self.src_pts[k][0]
                          - np.sum(pt_j * cur_pt) * self.src_pts[k][1]
                      )
                      tmp_pt[1] = (
                          -np.sum(pt_i * cur_pt_j) * self.src_pts[k][0]
                          + np.sum(pt_j * cur_pt_j) * self.src_pts[k][1]
                      )
                      tmp_pt *= w[k] / miu_s
                      new_pt += tmp_pt
  
                  new_pt += qstar
              else:
                  new_pt = self.src_pts[k]
  
              self.rdx[j, i] = new_pt[0] - i
              self.rdy[j, i] = new_pt[1] - j
  
              j += self.grid_size
          i += self.grid_size
  
imports: import numpy
label_desc: Use image node_id 4 for calling the WarpMLS obj's underlying member method code with example usage: obj.calc_delta() without return types