code: def encode(proposals, gt_boxes):
      """Encode the different adjustments needed to transform it to its
      corresponding ground truth box.
  
      Args:
          proposals: Numpy array of shape (total_proposals, 4). Having the
              bbox encoding in the (x_min, y_min, x_max, y_max) order.
          gt_boxes: Numpy array of shape (total_proposals, 4). With the same
              bbox encoding.
  
      Returns:
          targets: Numpy array of shape (total_proposals, 4) with the different
              deltas needed to transform the proposal to the gt_boxes. These
              deltas are with regards to the center, width and height of the
              two boxes.
      """
  
      (
          proposal_widths,
          proposal_heights,
          proposal_center_x,
          proposal_center_y,
      ) = get_bbox_properties(proposals)
      (
          gt_widths,
          gt_heights,
          gt_center_x,
          gt_center_y,
      ) = get_bbox_properties(gt_boxes)
  
      # We need to apply targets as specified by the paper parametrization
      # Faster RCNN 3.1.2
      targets_x = (gt_center_x - proposal_center_x) / proposal_widths
      targets_y = (gt_center_y - proposal_center_y) / proposal_heights
      targets_w = np.log(gt_widths / proposal_widths)
      targets_h = np.log(gt_heights / proposal_heights)
  
      targets = np.column_stack(
          (targets_x, targets_y, targets_w, targets_h)
      )
  
      return targets
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: encode(proposals, gt_boxes) and returns: targets