def METHOD_NAME(dtype):
    boxes1 = tf.constant([[4.0, 3.0, 7.0, 5.0], [5.0, 6.0, 10.0, 7.0]], dtype=dtype)
    boxes2 = tf.constant([[3.0, 4.0, 6.0, 8.0], [14.0, 14.0, 15.0, 15.0]], dtype=dtype)
    expected_result = tf.constant([0.875, 1.0], dtype=dtype)
    loss = giou_loss(boxes1, boxes2, mode="iou")
    test_utils.assert_allclose_according_to_type(loss, expected_result)