code: def writekv(f, k, v, flush=True):
      """writekv"""
      f.write(struct.pack("I", len(k)))
      f.write(k)
      f.write(struct.pack("I", len(v)))
      f.write(v)
      if flush:
          f.flush()
      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 2 for calling a global function with example usage: writekv(f, k, v, flush) without return types