def _blockdevice_volume_from_datasetid(volumes, dataset_id):
 for volume in volumes:
  if (volume.dataset_id == dataset_id):
   return volume

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 .