code: def rotate_points_along_z(points, angle):
      """Rotation clockwise
      Args:
          points: np.array of np.array (B, N, 3 + C) or
              (N, 3 + C) for single batch
          angle: np.array of np.array (B, )
              or (, ) for single batch
              angle along z-axis, angle increases x ==> y
      Returns:
          points_rot:  (B, N, 3 + C) or (N, 3 + C)
  
      """
      single_batch = len(points.shape) == 2
      if single_batch:
          points = np.expand_dims(points, axis=0)
          angle = np.expand_dims(angle, axis=0)
      cosa = np.expand_dims(np.cos(angle), axis=1)
      sina = np.expand_dims(np.sin(angle), axis=1)
      zeros = np.zeros_like(cosa)  # angle.new_zeros(points.shape[0])
      ones = np.ones_like(sina)  # angle.new_ones(points.shape[0])
  
      rot_matrix = np.concatenate(
          (cosa, -sina, zeros, sina, cosa, zeros, zeros, zeros, ones),
          axis=1,
      ).reshape(-1, 3, 3)
  
      # print(rot_matrix.view(3, 3))
      points_rot = np.matmul(points[:, :, :3], rot_matrix)
      points_rot = np.concatenate(
          (points_rot, points[:, :, 3:]), axis=-1
      )
  
      if single_batch:
          points_rot = points_rot.squeeze(0)
  
      return points_rot
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/rotation.py
imports: import cv2
  import math
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: rotate_points_along_z(points, angle) and returns: points_rot