code: def boxes_to_corners_3d(boxes3d):
      """
          7 -------- 4
         /|         /|
        6 -------- 5 .
        | |        | |
        . 3 -------- 0
        |/         |/
        2 -------- 1
      Args:
          boxes3d:  (N, 7) [x, y, z, dx, dy, dz, heading],
              (x, y, z) is the box center
  
      Returns:
          corners: (N, 8, 3)
      """
      template = (
          np.array(
              [
                  [1, 1, -1],
                  [1, -1, -1],
                  [-1, -1, -1],
                  [-1, 1, -1],
                  [1, 1, 1],
                  [1, -1, 1],
                  [-1, -1, 1],
                  [-1, 1, 1],
              ]
          )
          / 2.0
      )
  
      # corners3d: of shape (N, 3, 8)
      corners3d = (
          np.tile(boxes3d[:, None, 3:6], (1, 8, 1))
          * template[None, :, :]
      )
  
      corners3d = rotate_points_along_z(
          corners3d.reshape(-1, 8, 3), boxes3d[:, 6]
      ).reshape(-1, 8, 3)
      corners3d += boxes3d[:, None, 0:3]
  
      return corners3d
  
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 5 for calling a global function with example usage: boxes_to_corners_3d(boxes3d) and returns: corners3d