def METHOD_NAME(self,
                inputs: Union[Dict[str, Any],
                              TextClassificationModelOutput],
                topk: int = None) -> Dict[str, Any]:
    r"""The postprocess is to align the model output and the final outputs.
        Args:
            inputs (`Dict[str, Any]` or `TextClassificationModelOutput`): The model output, you can check
                `TextClassificationModelOutput` for more details.
            topk(int): The topk probs to take
        Returns:
            Dict[str, Any]: The final model prediction results.
                scores: The probabilities of each label.
                labels: The real labels read from id2label: ['dialogue', 'non_dialogue']
    """
    if getattr(self, 'id2label', None) is None:
        logger.warning(
            'The id2label mapping is None, will return original ids.')
    logits = inputs[OutputKeys.LOGITS].detach().cpu().numpy()
    if logits.shape[0] == 1:
        logits = logits[0]
    def softmax(logits):
        exp = np.exp(logits - np.max(logits, axis=-1, keepdims=True))
        return exp / exp.sum(axis=-1, keepdims=True)
    probs = softmax(logits)
    num_classes = probs.shape[-1]
    topk = min(topk, num_classes) if topk is not None else num_classes
    top_indices = np.argpartition(probs, -topk)[-topk:]
    probs = np.take_along_axis(probs, top_indices, axis=-1).tolist()
    def map_to_label(id):
        if getattr(self, 'id2label', None) is not None:
            if id in self.id2label:
                return self.id2label[id]
            elif str(id) in self.id2label:
                return self.id2label[str(id)]
            else:
                raise Exception(
                    f'id {id} not found in id2label: {self.id2label}')
        else:
            return id
    v_func = np.vectorize(map_to_label)
    top_indices = v_func(top_indices).tolist()
    probs = list(reversed(probs))
    top_indices = list(reversed(top_indices))
    return {OutputKeys.SCORES: probs, OutputKeys.LABELS: top_indices}