def download_kitti_multiview_dataset(
    dataset_dir,
    splits=None,
    scratch_dir=None,
    overwrite=False,
    cleanup=False,
    num_workers=None,
):
    """Downloads and prepares the multiview KITTI dataset.

    The dataset will be organized on disk in as follows, with each split stored
    in :ref:`FiftyOneDataset format <FiftyOneDataset-import>`::

        dataset_dir/
            train/
                labels/
                    000000.txt
                    000001.txt
                    ...
                calib/
                    000000.txt
                    000001.txt
                    ...
                left/
                    000000.png
                    000001.png
                    ...
                right/
                    000000.png
                    000001.png
                    ...
                velodyne/
                    000000.bin
                    000001.bin
                    ...
                pcd/
                    000000.pcd
                    000001.pcd
                    ...
                metadata.json
                samples.json
            test/
                ...

    Args:
        dataset_dir: the directory in which to construct the dataset
        splits (None): the split or list of splits to download. Supported
            values are ``("train", "test")``
        scratch_dir (None): a scratch directory to use to download any necessary
            temporary files
        overwrite (False): whether to redownload/regenerate files if they
            already exist
        cleanup (False): whether to delete the downloaded zips and scratch
            directory
        num_workers (None): a suggested number of processes to use when
            converting LiDAR to PCD
    """
    if splits is None:
        splits = ("test", "train")

    if not etau.is_container(splits):
        splits = [splits]

    if scratch_dir is None:
        scratch_dir = os.path.join(dataset_dir, "tmp-download")

    if "train" in splits:
        _download_and_unpack_kitti_zip(
            _LABELS,
            dataset_dir,
            scratch_dir,
            "train",
            "labels",
            cleanup=cleanup,
            overwrite=overwrite,
        )

    # Always unpack both splits because they come in a single zip
    all_splits = ("train", "test")

    _download_and_unpack_kitti_zip(
        _CALIB,
        dataset_dir,
        scratch_dir,
        all_splits,
        "calib",
        cleanup=cleanup,
        overwrite=overwrite,
    )

    _download_and_unpack_kitti_zip(
        _LEFT_IMAGES,
        dataset_dir,
        scratch_dir,
        all_splits,
        "left",
        cleanup=cleanup,
        overwrite=overwrite,
    )

    _download_and_unpack_kitti_zip(
        _RIGHT_IMAGES,
        dataset_dir,
        scratch_dir,
        all_splits,
        "right",
        cleanup=cleanup,
        overwrite=overwrite,
    )

    _download_and_unpack_kitti_zip(
        _VELODYNE,
        dataset_dir,
        scratch_dir,
        all_splits,
        "velodyne",
        cleanup=cleanup,
        overwrite=overwrite,
    )

    for split in splits:
        split_dir = os.path.join(dataset_dir, split)
        samples_path = os.path.join(split_dir, "samples.json")
        if overwrite or not os.path.isfile(samples_path):
            _prepare_kitti_split(
                split_dir, overwrite=overwrite, num_workers=num_workers
            )

    if cleanup:
        etau.delete_dir(scratch_dir)
Downloads and prepares the multiview KITTI dataset.

    The dataset will be organized on disk in as follows, with each split stored
    in :ref:`FiftyOneDataset format <FiftyOneDataset-import>`::

        dataset_dir/
            train/
                labels/
                    000000.txt
                    000001.txt
                    ...
                calib/
                    000000.txt
                    000001.txt
                    ...
                left/
                    000000.png
                    000001.png
                    ...
                right/
                    000000.png
                    000001.png
                    ...
                velodyne/
                    000000.bin
                    000001.bin
                    ...
                pcd/
                    000000.pcd
                    000001.pcd
                    ...
                metadata.json
                samples.json
            test/
                ...

    Args:
        dataset_dir: the directory in which to construct the dataset
        splits (None): the split or list of splits to download. Supported
            values are ``("train", "test")``
        scratch_dir (None): a scratch directory to use to download any necessary
            temporary files
        overwrite (False): whether to redownload/regenerate files if they
            already exist
        cleanup (False): whether to delete the downloaded zips and scratch
            directory
        num_workers (None): a suggested number of processes to use when
            converting LiDAR to PCD
    
fiftyone/utils/kitti.py