code: def trans_img_to_bin(img_name, output_path):
      with open(img_name, "rb") as fin:
          img = fin.read()
      key = os.path.split(img_name)[-1]
      with open(output_path, "wb") as fout:
          writekv(fout, key.encode(), pickle.dumps(img, -1))
      return
  
file_path: insightface/recognition/arcface_paddle/datasets/kv_helper.py
imports: import os
  import pickle
  import struct
  import random
  import multiprocessing
  import numpy
  import cv2
  import json
label_desc: Use image node_id 3 for calling a global function with example usage: trans_img_to_bin(img_name, output_path) without return types