code: def get_bboxes_giou(boxes1, boxes2, eps=1e-9):
      """calculate the ious of boxes1 and boxes2
  
      Args:
          boxes1 (Tensor): shape [N, 4]
          boxes2 (Tensor): shape [M, 4]
          eps (float): epsilon to avoid divide by zero
  
      Return:
          ious (Tensor): ious of boxes1 and boxes2, with the shape [N, M]
      """
      assert (boxes1[:, 2:] >= boxes1[:, :2]).all()
      assert (boxes2[:, 2:] >= boxes2[:, :2]).all()
  
      iou, union = boxes_iou(boxes1, boxes2)
  
      lt = paddle.minimum(boxes1.unsqueeze(-2)[:, :, :2], boxes2[:, :2])
      rb = paddle.maximum(boxes1.unsqueeze(-2)[:, :, 2:], boxes2[:, 2:])
  
      wh = (rb - lt).astype("float32").clip(min=eps)
      enclose_area = wh[:, :, 0] * wh[:, :, 1]
  
      giou = iou - (enclose_area - union) / enclose_area
  
      return giou
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from scipy.optimize import linear_sum_assignment
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle.metric import accuracy
  from ppdet.core.workspace import register
  from ppdet.modeling.losses.iou_loss import GIoULoss
label_desc: Use image node_id 3 for calling a global function with example usage: get_bboxes_giou(boxes1, boxes2, eps) and returns: giou