def _gather_parts_for_balance_can_disperse(self, assign_parts, start,
                                               replica_plan):
        # Last, we gather partitions from devices that are "overweight" because
        # they have more partitions than their parts_wanted.
        for offset in range(self.parts):
            part = (start + offset) % self.parts
            if self._last_part_moves[part] < self.min_part_hours:
                continue
            # For each part we'll look at the devices holding those parts and
            # see if any are overweight, keeping track of replicas_at_tier as
            # we go
            overweight_dev_replica = []
            replicas_at_tier = defaultdict(int)
            for replica in self._replicas_for_part(part):
                dev_id = self._replica2part2dev[replica][part]
                if dev_id == NONE_DEV:
                    continue
                dev = self.devs[dev_id]
                for tier in dev['tiers']:
                    replicas_at_tier[tier] += 1
                if dev['parts_wanted'] < 0:
                    overweight_dev_replica.append((dev, replica))

            if not overweight_dev_replica:
                continue

            overweight_dev_replica.sort(
                key=lambda dr: dr[0]['parts_wanted'])
            for dev, replica in overweight_dev_replica:
                if self._last_part_moves[part] < self.min_part_hours:
                    break
                if any(replica_plan[tier]['min'] <=
                       replicas_at_tier[tier] <
                       replica_plan[tier]['max']
                       for tier in dev['tiers']):
                    continue

                # this is the most overweight_device holding a replica
                # of this part that can shed it according to the plan
                dev['parts_wanted'] += 1
                dev['parts'] -= 1
                assign_parts[part].append(replica)
                self.logger.debug(
                    "Gathered %d/%d from dev %d [weight disperse]",
                    part, replica, dev['id'])
                self._replica2part2dev[replica][part] = NONE_DEV
                for tier in dev['tiers']:
                    replicas_at_tier[tier] -= 1
                self._last_part_moves[part] = 0
Boto is configured to send log events to Eliot when it makes an AWS API
dataset/ETHPy150Open openstack/swift/swift/common/ring/builder.py/RingBuilder._gather_parts_for_balance_can_disperse--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/functional/test_ebs.py/EBSBlockDeviceAPIInterfaceTests.test_boto_request_logging