code: def clip_bbox(bbox, img_height, img_width):
      bbox["left"] = int(max(min(bbox["left"], img_width), 0.0))
      bbox["top"] = int(max(min(bbox["top"], img_height), 0.0))
      bbox["right"] = int(max(min(bbox["right"], img_width), 0.0))
      bbox["bottom"] = int(max(min(bbox["bottom"], img_height), 0.0))
      return bbox
  
file_path: PaddleHub/modules/image/face_detection/pyramidbox_lite_server/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import os
  import time
  import cv2
  import numpy
  from PIL import Image
label_desc: Use image node_id 4 for calling a global function with example usage: clip_bbox(bbox, img_height, img_width) and returns: bbox