code: def test_box_iou(box1, box2, iou, abs_tol):
      iou_mat = metrics.box_iou(np.asarray(box1), np.asarray(box2))
      assert iou_mat.shape == (len(box1), len(box2))
      if iou_mat.size > 0:
          assert abs(iou_mat - iou) <= abs_tol
  
file_path: doctr/tests/common/test_utils_metrics.py
imports: import numpy
  import pytest
  from doctr.utils import metrics
label_desc: Use image node_id 2 for calling a global function with example usage: test_box_iou(box1, box2, iou, abs_tol) without return types