def METHOD_NAME(self,
                inputs: Dict[str, Any],
                topk: int = None) -> Dict[str, Any]:
    """Process the prediction results
            Args:
                inputs (`Dict[str, Any]` or `DialogueUseClassificationModelOutput`): The model output, please check
                    the `DialogueUseClassificationModelOutput` class for details.
                topk (int): The topk probs to take
            Returns:
                Dict[str, Any]: the prediction results.
                    scores: The probabilities of each label.
                    labels: The real labels.
                Label at index 0 is the largest probability.
            """
    logits = inputs[OutputKeys.LOGITS].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}