code: def _normalize_3d_detections(detections):
      if detections is None:
          return None
  
      # DontCare labels don't have valid coordinates
      detections.detections = [
          d for d in detections.detections if d["label"] != "DontCare"
      ]
  
      for detection in detections.detections:
          # KITTI uses bottom-center; FiftyOne uses centroid
          detection["location"][1] -= 0.5 * detection["dimensions"][1]
  
          # Resolve yaw mismatch between LIDAR and scene
          detection["rotation"][1] -= 0.5 * np.pi
  
          # Switch to z-up coordinates
          detection["location"] = _swap_coordinates(
              detection["location"]
          )
          detection["dimensions"] = _swap_coordinates(
              detection["dimensions"]
          )
          detection["rotation"] = _swap_coordinates(
              detection["rotation"]
          )
  
      return detections
  
imports: import csv
  import logging
  import struct
  import os
  import numpy
  import eta.core.utils
  import eta.core.web
  import fiftyone
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.utils.data
label_desc: Use image node_id 9 for calling a global function with example usage: _normalize_3d_detections(detections) and returns: detections, None