def _blockdevice_volume_from_datasetid(volumes, dataset_id):
    for volume in volumes:
        if volume.dataset_id == dataset_id:
            return volume
A helper to get the volume for a given dataset_id.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/blockdevice.py/_blockdevice_volume_from_datasetid