code: def __call__(self, bboxes1, bboxes2, mode="iou", is_aligned=False):
      TO_REMOVE = 1
      area1 = (bboxes1[:, 2] - bboxes1[:, 0] + TO_REMOVE) * (
          bboxes1[:, 3] - bboxes1[:, 1] + TO_REMOVE
      )
      area2 = (bboxes2[:, 2] - bboxes2[:, 0] + TO_REMOVE) * (
          bboxes2[:, 3] - bboxes2[:, 1] + TO_REMOVE
      )
  
      lt = torch.max(bboxes1[:, None, :2], bboxes2[:, :2])  # [N,M,2]
      rb = torch.min(bboxes1[:, None, 2:], bboxes2[:, 2:])  # [N,M,2]
  
      wh = (rb - lt + TO_REMOVE).clamp(min=0)  # [N,M,2]
      inter = wh[:, :, 0] * wh[:, :, 1]  # [N,M]
  
      iou = inter / (area1[:, None] + area2 - inter)
      return iou
  
file_path: mmdetection/mmdet/models/task_modules/assigners/iou2d_calculator.py
imports: import torch
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps, get_box_tensor
label_desc: Use image node_id 1 for calling the BboxOverlaps2D_GLIP obj's underlying member method code with example usage: obj.__call__(bboxes1, bboxes2, mode, is_aligned) and returns: iou