'Returns a list of replicas for a specified partition.
These can be used as indices into self._replica2part2dev
without worrying about IndexErrors.'

def _replicas_for_part(self, part):

    return [replica for (replica, part2dev) in enumerate(self._replica2part2dev) if (part < len(part2dev))]
