'Generator yielding every (partition, replica) pair in the ring.'

def _each_part_replica(self):

    for (replica, part2dev) in enumerate(self._replica2part2dev):
        for part in range(len(part2dev)):
            (yield (part, replica))
