def dataset_map_from_iterable(iterable):
    """
    Turn a list of datasets into a map from their IDs to the datasets.
    """
    return {dataset.dataset_id: dataset
            for dataset in iterable}