code: def get_votes(points, gt_boxes):
      """
      Args:
          points: (N, 3)
          boxes: (m, 8, 3)
      Returns:
          votes: (N, 4)
      """
      n_point = points.shape[0]
      point_votes = np.zeros((n_point, 4)).astype(np.float32)
      for obj_id in range(gt_boxes.shape[0]):
          tmp_box3d = np.expand_dims(gt_boxes[obj_id], 0)  # (8, 3)
          # (n_point, 1)
          mask_pts = points_in_boxes(points[:, :3], tmp_box3d)
          mask_pts = mask_pts.reshape((-1,))
          point_votes[mask_pts, 0] = 1.0
          obj_center = np.mean(tmp_box3d, axis=1)  # (1, 3)
  
          # get votes
          pc_roi = points[mask_pts, :3]
          tmp_votes = obj_center - pc_roi
          point_votes[mask_pts, 1:4] = tmp_votes
      return point_votes
  
file_path: ARKitScenes/threedod/benchmark_scripts/prepare_votes.py
imports: import argparse
  import numpy
  import os
  import sys
  import time
  from utils.box_utils import boxes_to_corners_3d, points_in_boxes
  from utils.visual_utils import visualize_o3d
label_desc: Use image node_id 1 for calling a global function with example usage: get_votes(points, gt_boxes) and returns: point_votes