def __call__(self, preds: np.ndarray) -> np.ndarray:
        """
        Perform model postprocessing and return postprocessed output.

        :param preds: model output to be postprocessed.
        :return: Postprocessed model output.
        """
        class_labels = np.zeros_like(preds)
        if preds.shape[1] > 1:
            index_labels = np.argmax(preds, axis=1)
            class_labels[:, index_labels] = 1
        else:
            class_labels[preds > 0.5] = 1

        return class_labels

        Perform model postprocessing and return postprocessed output.

        :param preds: model output to be postprocessed.
        :return: Postprocessed model output.
        
art/defences/postprocessor/class_labels.py