code: def box_iou(
      boxes0: Tensor,
      boxes1: Tensor,
      eps: Optional[float] = 1e-5,
      *args,
      **kwargs,
  ) -> Tensor:
      """
      Computes intersection-over-union between two boxes
      Args:
          boxes0 (Tensor): Boxes 0 of shape (N, 4)
          boxes1 (Tensor): Boxes 1 of shape (N or 1, 4)
          eps (Optional[float]): A small value is added to denominator for numerical stability
  
      Returns:
          iou (Tensor): IoU values between boxes0 and boxes1 and has shape (N)
      """
  
      def area_of(left_top, right_bottom) -> torch.Tensor:
          """
          Given two corners of the rectangle, compute the area
          Args:
              left_top (N, 2): left top corner.
              right_bottom (N, 2): right bottom corner.
          Returns:
              area (N): return the area.
          """
          hw = torch.clamp(right_bottom - left_top, min=0.0)
          return hw[..., 0] * hw[..., 1]
  
      overlap_left_top = torch.max(boxes0[..., :2], boxes1[..., :2])
      overlap_right_bottom = torch.min(boxes0[..., 2:], boxes1[..., 2:])
  
      overlap_area = area_of(overlap_left_top, overlap_right_bottom)
      area0 = area_of(boxes0[..., :2], boxes0[..., 2:])
      area1 = area_of(boxes1[..., :2], boxes1[..., 2:])
      return overlap_area / (area0 + area1 - overlap_area + eps)
  
imports: import math
  from typing import Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: box_iou(boxes0, boxes1, eps) and returns: unknown, unknown