@cache_readonly
def _sort_idx(self) -> npt.NDArray[np.intp]:
    return get_group_index_sorter(self.labels, self.ngroups)
@cache_readonly
def _sort_idx(self) -> npt.NDArray[np.intp]:
    return get_group_index_sorter(self.labels, self.ngroups)