code: def point4_to_box(points):
      """
      Args:
          points: (nx4)x2
      Returns:
          nx4 boxes (x1y1x2y2)
      """
      p = points.reshape((-1, 4, 2))
      minxy = p.min(axis=1)  # nx2
      maxxy = p.max(axis=1)  # nx2
      return np.concatenate((minxy, maxxy), axis=1)
  
file_path: tensorpack/examples/FasterRCNN/common.py
imports: import numpy
  import cv2
  from tensorpack.dataflow import RNGDataFlow
  from tensorpack.dataflow.imgaug import ImageAugmentor, ResizeTransform
label_desc: Use image node_id 2 for calling a global function with example usage: point4_to_box(points) and returns: np