def _gather_parts_from_failed_devices(self, assign_parts):
        # First we gather partitions from removed devices. Since removed
        # devices usually indicate device failures, we have no choice but to
        # reassign these partitions. However, we mark them as moved so later
        # choices will skip other replicas of the same partition if possible.

        if self._remove_devs:
            dev_ids = [d['id'] for d in self._remove_devs if d['parts']]
            if dev_ids:
                for part, replica in self._each_part_replica():
                    dev_id = self._replica2part2dev[replica][part]
                    if dev_id in dev_ids:
                        self._replica2part2dev[replica][part] = NONE_DEV
                        self._last_part_moves[part] = 0
                        assign_parts[part].append(replica)
                        self.logger.debug(
                            "Gathered %d/%d from dev %d [dev removed]",
                            part, replica, dev_id)
        removed_devs = 0
        while self._remove_devs:
            remove_dev_id = self._remove_devs.pop()['id']
            self.logger.debug("Removing dev %d", remove_dev_id)
            self.devs[remove_dev_id] = None
            removed_devs += 1
        return removed_devs
Gets expiration header named `argument` of queue definition.
dataset/ETHPy150Open openstack/swift/swift/common/ring/builder.py/RingBuilder._gather_parts_from_failed_devices--crossover with--dataset/ETHPy150Open celery/kombu/kombu/transport/mongodb.py/Channel._get_expire