code: def slow_wdist(A, B, W):
      k, m = A.shape
      _, n = B.shape
      D = np.zeros((m, n))
  
      for ii in range(m):
          for jj in range(n):
              wdiff = (A[:, ii] - B[:, jj]) / W[:, ii]
              D[ii, jj] = np.sqrt((wdiff**2).sum())
      return D
  
label_desc: Use image node_id 1 for calling a global function with example usage: slow_wdist(A, B, W) and returns: D