code: def expand_boxes(boxes, scale=0.0):
      """
      Args:
          boxes (np.ndarray): shape:[N,4], N:number of box,
                              matix element:[x_min, y_min, x_max, y_max]
          scale (float): scale of boxes
      Returns:
          boxes_exp (np.ndarray): expanded boxes
      """
      w_half = (boxes[:, 2] - boxes[:, 0]) * 0.5
      h_half = (boxes[:, 3] - boxes[:, 1]) * 0.5
      x_c = (boxes[:, 2] + boxes[:, 0]) * 0.5
      y_c = (boxes[:, 3] + boxes[:, 1]) * 0.5
      w_half *= scale
      h_half *= scale
      boxes_exp = np.zeros(boxes.shape)
      boxes_exp[:, 0] = x_c - w_half
      boxes_exp[:, 2] = x_c + w_half
      boxes_exp[:, 1] = y_c - h_half
      boxes_exp[:, 3] = y_c + h_half
      return boxes_exp
  
file_path: PaddleHub/modules/image/instance_segmentation/solov2/data_feed.py
imports: import base64
  import cv2
  import numpy
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from paddle.inference import PrecisionType
  from PIL import Image
  from PIL import ImageDraw
label_desc: Use image node_id 4 for calling a global function with example usage: expand_boxes(boxes, scale) and returns: boxes_exp