def METHOD_NAME(self, sample_size: int) -> Iterator[int]:
    """Slice the infinite indices by rank."""
    yield from itertools.islice(
        self._infinite_indices(sample_size), self.rank, None,
        self.world_size)