code: def batch_euclidean_distance(qf, gf, N=6000):
      m = qf.shape[0]
      n = gf.shape[0]
      dist_mat = []
      for j in range(n // N + 1):
          temp_gf = gf[j * N : j * N + N]
          temp_qd = []
          for i in range(m // N + 1):
              temp_qf = qf[i * N : i * N + N]
              temp_d = euclidean_distance(temp_qf, temp_gf)
              temp_qd.append(temp_d)
          temp_qd = np.concatenate(temp_qd, axis=0)
          temp_qd = temp_qd / (np.max(temp_qd, axis=0)[0])
          dist_mat.append(temp_qd.T)
      del temp_qd
      del temp_gf
      del temp_qf
      del temp_d
      dist_mat = np.concatenate(dist_mat, axis=0)
      return dist_mat
  
imports: import os
  import re
  import cv2
  import gc
  import numpy
  import pandas
  from tqdm import tqdm
  import warnings
label_desc: Use image node_id 15 for calling a global function with example usage: batch_euclidean_distance(qf, gf, N) and returns: dist_mat