code: def rdist(x, y):
      
      result = 0.0
      for i in range(x.shape[0]):
          result += (x[i] - y[i]) ** 2
  
      return result
docs: Reduced Euclidean distance.
  
      Parameters
      ----------
      x: array of shape (embedding_dim,)
      y: array of shape (embedding_dim,)
  
      Returns
      -------
      The squared euclidean distance between x and y