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 = torch.empty(
              (len(issame_list) * 2, 3, image_size[0], image_size[1])
          )
          data_list.append(data)
      for idx in range(len(issame_list) * 2):
          _bin = bins[idx]
          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][idx][:] = torch.from_numpy(img.asnumpy())
          if idx % 1000 == 0:
              print("loading bin", idx)
      print(data_list[0].shape)
      return data_list, issame_list
  
imports: import datetime
  import os
  import pickle
  import mxnet
  import numpy
  import sklearn
  import torch
  from mxnet import ndarray
  from scipy import interpolate
  from sklearn.decomposition import PCA
  from sklearn.model_selection import KFold
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