@final
def _get_compressed_codes(self) -> tuple[(np.ndarray, npt.NDArray[np.intp])]:
    if (len(self.groupings) > 1):
        group_index = get_group_index(self.codes, self.shape, sort=True, xnull=True)
        return compress_group_index(group_index, sort=self._sort)
    ping = self.groupings[0]
    return (ping.codes, np.arange(len(ping.group_index), dtype=np.intp))
@final
def _get_compressed_codes(self) -> tuple[(np.ndarray, npt.NDArray[np.intp])]:
    if (len(self.groupings) > 1):
        group_index = get_group_index(self.codes, self.shape, sort=True, xnull=True)
        return compress_group_index(group_index, sort=self._sort)
    ping = self.groupings[0]
    return (ping.codes, np.arange(len(ping.group_index), dtype=np.intp))