code: def get_embeddings(
      model_interf, img_names, landmarks, batch_size=64, flip=True
  ):
      steps = int(np.ceil(len(img_names) / batch_size))
      embs, embs_f = [], []
      for batch_id in tqdm(
          range(0, len(img_names), batch_size), "Embedding", total=steps
      ):
          batch_imgs, batch_landmarks = (
              img_names[batch_id : batch_id + batch_size],
              landmarks[batch_id : batch_id + batch_size],
          )
          ndimages = [
              face_align_landmark(cv2.imread(img), landmark)
              for img, landmark in zip(batch_imgs, batch_landmarks)
          ]
          ndimages = np.stack(ndimages)
          embs.extend(model_interf(ndimages))
          if flip:
              embs_f.extend(model_interf(ndimages[:, :, ::-1, :]))
      return np.array(embs), np.array(embs_f)
  
imports: import os
  import cv2
  import numpy
  import pandas
  from tqdm import tqdm
  from skimage import transform
  from sklearn.preprocessing import normalize
  from sklearn.metrics import roc_curve, auc
label_desc: Use image node_id 6 for calling a global function with example usage: get_embeddings(model_interf, img_names, landmarks, batch_size, flip) and returns: np,  np