code: def pairwise_point_box_distance(points: torch.Tensor, boxes: Boxes):
      """
      Pairwise distance between N points and M boxes. The distance between a
      point and a box is represented by the distance from the point to 4 edges
      of the box. Distances are all positive when the point is inside the box.
  
      Args:
          points: Nx2 coordinates. Each row is (x, y)
          boxes: M boxes
  
      Returns:
          Tensor: distances of size (N, M, 4). The 4 values are distances from
              the point to the left, top, right, bottom of the box.
      """
      x, y = points.unsqueeze(dim=2).unbind(dim=1)  # (N, 1)
      x0, y0, x1, y1 = boxes.tensor.unsqueeze(dim=0).unbind(
          dim=2
      )  # (1, M)
      return torch.stack([x - x0, y - y0, x1 - x, y1 - y], dim=2)
  
imports: import math
  import numpy
  from enum import IntEnum, unique
  from typing import List, Tuple, Union
  import torch
  from torch import device
label_desc: Use image node_id 4 for calling a global function with example usage: pairwise_point_box_distance(points, boxes) and returns: torch