def METHOD_NAME(self, key, index):
    assert (
        self._ordered_indices is not None
    ), "Must call RoundRobinZipDatasets.ordered_indices() first"
    o = self._ordered_indices[key]
    return o[index % len(o)]