def _blockdevicevolume_from_blockdevice_id(blockdevice_id, size, attached_to=None):
 dataset_id = UUID(blockdevice_id[6:])
 return BlockDeviceVolume(size=size, attached_to=attached_to, dataset_id=dataset_id, blockdevice_id=blockdevice_id)

def _blockdevicevolume_from_blockdevice_id ( blockdevice_id , size , attached_to = None ) : dataset_id = UUID ( blockdevice_id [ 6 : ] ) return BlockDeviceVolume ( size = size , attached_to = attached_to , dataset_id = dataset_id , blockdevice_id = blockdevice_id )
create a new blockdevicevolume with a dataset_id derived from the given blockdevice_id .