code: def draw_e2e_res(dt_boxes, strs, config, img, img_name):
      if len(dt_boxes) > 0:
          src_im = img
          for box, str in zip(dt_boxes, strs):
              box = box.astype(np.int32).reshape((-1, 1, 2))
              cv2.polylines(
                  src_im, [box], True, color=(255, 255, 0), thickness=2
              )
              cv2.putText(
                  src_im,
                  str,
                  org=(int(box[0, 0, 0]), int(box[0, 0, 1])),
                  fontFace=cv2.FONT_HERSHEY_COMPLEX,
                  fontScale=0.7,
                  color=(0, 255, 0),
                  thickness=1,
              )
          save_det_path = (
              os.path.dirname(config["Global"]["save_res_path"])
              + "/e2e_results/"
          )
          if not os.path.exists(save_det_path):
              os.makedirs(save_det_path)
          save_path = os.path.join(
              save_det_path, os.path.basename(img_name)
          )
          cv2.imwrite(save_path, src_im)
          logger.info("The e2e Image saved in {}".format(save_path))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import os
  import sys
  import cv2
  import json
  import paddle
  from ppocr.data import create_operators, transform
  from ppocr.modeling.architectures import build_model
  from ppocr.postprocess import build_post_process
  from ppocr.utils.save_load import load_model
  from ppocr.utils.utility import get_image_file_list
  import tools.program
  from PIL import Image, ImageDraw, ImageFont
  import math
label_desc: Use image node_id 2 for calling a global function with example usage: draw_e2e_res(dt_boxes, strs, config, img, img_name) without return types