'Remove multiple volumes from a storage group.
:param serial_number: the array serial number
:param list_of_device_ids: list of device ids
:param storagegroup_name: the name of the storage group
:param extra_specs: the extra specifications
:raises: VolumeBackendAPIException'

def remove_volumes_from_storage_group(self, serial_number, list_of_device_ids, storagegroup_name, extra_specs):

    start_time = time.time()
    @coordination.synchronized('emc-sg-{sg_name}')
    def do_remove_volumes_from_storage_group(sg_name):
        self.rest.remove_vol_from_sg(serial_number, storagegroup_name, list_of_device_ids, extra_specs)
        LOG.debug('Remove    volumes    from    storagegroup    took:    %(delta)s    H:MM:SS.', {'delta': self.utils.get_time_delta(start_time, time.time())})
        volume_list = self.rest.get_volumes_in_storage_group(serial_number, storagegroup_name)
        for device_id in list_of_device_ids:
            if (device_id in volume_list):
                exception_message = (_('Failed    to    remove    device    with    id    %(dev_id)s    from    SG:    %(sg_name)s.') % {'dev_id': device_id, 'sg_name': storagegroup_name})
                LOG.error(exception_message)
                raise exception.VolumeBackendAPIException(data=exception_message)
    return do_remove_volumes_from_storage_group(storagegroup_name)
