code: def load_bin(path, image_size):
      # try:
      #     with open(path, 'rb') as f:
      #         bins, issame_list = pickle.load(f)  # py2
      # except UnicodeDecodeError as e:
      with open(path, "rb") as f:
          bins, issame_list = pickle.load(f, encoding="bytes")  # py3
      data_list = []
      for flip in [0, 1]:
          data = nd.empty(
              (len(issame_list) * 2, 3, image_size[0], image_size[1])
          )
          data_list.append(data)
      for i in range(len(issame_list) * 2):
          _bin = bins[i]
          img = mx.image.imdecode(_bin)
          if img.shape[1] != image_size[0]:
              img = mx.image.resize_short(img, image_size[0])
          img = nd.transpose(img, axes=(2, 0, 1))
          for flip in [0, 1]:
              if flip == 1:
                  img = mx.ndarray.flip(data=img, axis=2)
              data_list[flip][i][:] = img
      print("test bin loaded done:", data_list[0].shape)
      return (data_list, issame_list)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import argparse
  import sys
  import numpy
  from scipy import misc
  from sklearn.model_selection import KFold
  from scipy import interpolate
  import sklearn
  import cv2
  import math
  import datetime
  import pickle
  from sklearn.decomposition import PCA
  import mxnet
  from mxnet import ndarray
label_desc: Use image node_id 6 for calling a global function with example usage: load_bin(path, image_size) and returns: data_list,  issame_list