code: def points_in_boxes(points, boxes):
      """
      Args:
          pc: np.array (n, 3+d)
          boxes: np.array (m, 8, 3)
      Returns:
          mask: np.array (n, m) of type bool
      """
      if len(boxes) == 0:
          return np.zeros([points.shape[0], 1], dtype=np.bool)
      points = points[:, :3]  # get xyz
      # u = p6 - p5
      u = boxes[:, 6, :] - boxes[:, 5, :]  # (m, 3)
      # v = p6 - p7
      v = boxes[:, 6, :] - boxes[:, 7, :]  # (m, 3)
      # w = p6 - p2
      w = boxes[:, 6, :] - boxes[:, 2, :]  # (m, 3)
  
      # ux, vx, wx
      ux = np.matmul(points, u.T)  # (n, m)
      vx = np.matmul(points, v.T)
      wx = np.matmul(points, w.T)
  
      # up6, up5, vp6, vp7, wp6, wp2
      up6 = np.sum(u * boxes[:, 6, :], axis=1)
      up5 = np.sum(u * boxes[:, 5, :], axis=1)
      vp6 = np.sum(v * boxes[:, 6, :], axis=1)
      vp7 = np.sum(v * boxes[:, 7, :], axis=1)
      wp6 = np.sum(w * boxes[:, 6, :], axis=1)
      wp2 = np.sum(w * boxes[:, 2, :], axis=1)
  
      mask_u = np.logical_and(ux <= up6, ux >= up5)  # (1024, n)
      mask_v = np.logical_and(vx <= vp6, vx >= vp7)
      mask_w = np.logical_and(wx <= wp6, wx >= wp2)
  
      mask = mask_u & mask_v & mask_w  # (10240, n)
  
      return mask
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/box_utils.py
imports: import numpy
  import scipy.spatial
  from .rotation import rotate_points_along_z
label_desc: Use image node_id 6 for calling a global function with example usage: points_in_boxes(points, boxes) and returns: mask, np