code: def readkv(f):
      """readkv"""
      keylendata = f.read(4)
      if len(keylendata) != 4:
          return None
      keylen = struct.unpack("I", keylendata)[0]
      if keylen > 5000:
          raise Exception("wrong key len" + str(keylen))
      key = f.read(keylen)
      valuelen = struct.unpack("I", f.read(4))[0]
      value = f.read(valuelen)
      return key, value
  
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 1 for calling a global function with example usage: readkv(f) and returns: key,  value, None