#NEWLINE# def _blockdevice_volume_from_datasetid( volumes , dataset_id ) : #NEWLINE# #INDENT# '\n    A helper to get the volume for a given dataset_id.\n\n    :param list volumes: The ``BlockDeviceVolume`` instances to inspect for a\n        match.\n    :param UUID dataset_id: The identifier of the dataset the volume of which\n        to find.\n\n    :return: Either a ``BlockDeviceVolume`` matching the given ``dataset_id``\n        or ``None`` if no such volume can be found.\n    ' #NEWLINE# for volume in volume : #NEWLINE# #INDENT# if ( volume . dataset_id == dataset_id ) : #NEWLINE# #INDENT# return volume