code: def directed_hausdorff_noshuffle(ar1, ar2, seed=0):
      N1, data_dims = ar1.shape
      N2 = ar2.shape[0]
      i_store = j_store = i_ret = j_ret = 0
  
      resort1 = np.arange(N1)
      resort2 = np.arange(N2)
      ar1 = np.asarray(ar1)[resort1]
      ar2 = np.asarray(ar2)[resort2]
  
      cmax = 0
      for i in range(N1):
          cmin = np.inf
          for j in range(N2):
              d = np.sum((ar1[i] - ar2[j]) ** 2)
              # faster performance with square of distance
              # avoid sqrt until very end
              if d < cmax:  # break out of `for j` loop
                  break
  
              if (
                  d < cmin
              ):  # always true on first iteration of for-j loop
                  cmin = d
                  i_store = i
                  j_store = j
          else:
              # always true on first iteration of for-j loop, after that only
              # if d >= cmax
              if cmin != np.inf and cmin > cmax:
                  cmax = cmin
                  i_ret = i_store
                  j_ret = j_store
  
      return np.sqrt(cmax), resort1[i_ret], resort2[j_ret]
  
imports: import numpy
  import numpy.random
label_desc: Use image node_id 2 for calling a global function with example usage: directed_hausdorff_noshuffle(ar1, ar2, seed) and returns: np,  resort1,  resort2