code: def save_widerface_bboxes(image_path, bboxes_scores, output_dir):
      image_name = image_path.split("/")[-1]
      image_class = image_path.split("/")[-2]
      odir = os.path.join(output_dir, image_class)
      if not os.path.exists(odir):
          os.makedirs(odir)
  
      ofname = os.path.join(odir, "%s.txt" % (image_name[:-4]))
      f = open(ofname, "w")
      f.write("{:s}\n".format(image_class + "/" + image_name))
      f.write("{:d}\n".format(bboxes_scores.shape[0]))
      for box_score in bboxes_scores:
          xmin, ymin, xmax, ymax, score = box_score
          f.write(
              "{:.1f} {:.1f} {:.1f} {:.1f} {:.3f}\n".format(
                  xmin,
                  ymin,
                  (xmax - xmin + 1),
                  (ymax - ymin + 1),
                  score,
              )
          )
      f.close()
      logger.info("The predicted result is saved as {}".format(ofname))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import cv2
  import numpy
  from collections import OrderedDict
  import paddle
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 10 for calling a global function with example usage: save_widerface_bboxes(image_path, bboxes_scores, output_dir) without return types