code: def load_dataset(lfw_dir, image_size):
      lfw_pairs = read_pairs(os.path.join(lfw_dir, "pairs.txt"))
      lfw_paths, issame_list = get_paths(lfw_dir, lfw_pairs, "jpg")
      lfw_data_list = []
      for flip in [0, 1]:
          lfw_data = nd.empty(
              (len(lfw_paths), 3, image_size[0], image_size[1])
          )
          lfw_data_list.append(lfw_data)
      i = 0
      for path in lfw_paths:
          with open(path, "rb") as fin:
              _bin = fin.read()
              img = mx.image.imdecode(_bin)
              img = nd.transpose(img, axes=(2, 0, 1))
              for flip in [0, 1]:
                  if flip == 1:
                      img = mx.ndarray.flip(data=img, axis=2)
                  lfw_data_list[flip][i][:] = img
              i += 1
              if i % 1000 == 0:
                  print("loading lfw", i)
      print(lfw_data_list[0].shape)
      print(lfw_data_list[1].shape)
      return (lfw_data_list, issame_list)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  from scipy import misc
  from sklearn.model_selection import KFold
  from scipy import interpolate
  import sklearn
  from sklearn.decomposition import PCA
  import mxnet
  from mxnet import ndarray
label_desc: Use image node_id 8 for calling a global function with example usage: load_dataset(lfw_dir, image_size) and returns: lfw_data_list,  issame_list