def compare_dataset_states(discovered_datasets, desired_datasets):
    for dataset_id in set(discovered_datasets) | set(desired_datasets):
        desired_dataset = desired_datasets.get(dataset_id)
        discovered_dataset = discovered_datasets.get(dataset_id)
        if not compare_dataset_state(
            discovered_dataset=discovered_dataset,
            desired_dataset=desired_dataset,
        ):
            return False
    return True
Compare discovered and desired state of datasets to determine if they have
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/test/test_blockdevice.py/compare_dataset_states