def _write_with_removed_labels_kitti(src_kitti_path, dest_kitti_path,
    valid_labels):
    """
    Writes a KITTI annotation file containing only valid label labels,
    essentially a copy of the source KITTI file without any bounding boxes
    that contain "non-valid" labels.

    :param src_kitti_path:
    :param dest_kitti_path:
    :param valid_labels:
    """
    with open(dest_kitti_path, 'w') as dest_kitti_file:
        with open(src_kitti_path, 'r') as src_kitti_file:
            for line in src_kitti_file:
                kitti_label = line.split()[0]
                if kitti_label in valid_labels:
                    dest_kitti_file.write(line)
