code: def expand_bboxes(
      bboxes,
      image_width,
      image_height,
      expand_left=2.0,
      expand_up=2.0,
      expand_right=2.0,
      expand_down=2.0,
  ):
      """
      Expand bboxes, expand 2 times by defalut.
      """
      expand_boxes = []
      for bbox in bboxes:
          xmin = bbox[0]
          ymin = bbox[1]
          xmax = bbox[2]
          ymax = bbox[3]
          w = xmax - xmin
          h = ymax - ymin
          ex_xmin = max(xmin - w / expand_left, 0.0)
          ex_ymin = max(ymin - h / expand_up, 0.0)
          ex_xmax = min(xmax + w / expand_right, image_width)
          ex_ymax = min(ymax + h / expand_down, image_height)
          expand_boxes.append([ex_xmin, ex_ymin, ex_xmax, ex_ymax])
      return expand_boxes
  
imports: from __future__ import print_function
  import numpy
  import cv2
  import os
  import math
  import sys
  import random
  from ..config import config
label_desc: Use image node_id 7 for calling a global function with example usage: expand_bboxes(bboxes, image_width, image_height, expand_left, expand_up, expand_right, expand_down) and returns: expand_boxes