code: def face_distance(face_encodings, face_to_compare):
      """
      Given a list of face encodings, compare them to a known face encoding and get a euclidean distance
      for each comparison face. The distance tells you how similar the faces are.
  
      :param face_encodings: List of face encodings to compare
      :param face_to_compare: A face encoding to compare against
      :return: A numpy ndarray with the distance for each face in the same order as the 'faces' array
      """
      if len(face_encodings) == 0:
          return np.empty((0))
  
      return np.linalg.norm(face_encodings - face_to_compare, axis=1)
  
file_path: face_recognition/face_recognition/api.py
imports: import PIL.Image
  import dlib
  import numpy
  from PIL import ImageFile
label_desc: Use image node_id 4 for calling a global function with example usage: face_distance(face_encodings, face_to_compare) and returns: np, np