    def _format_failing_examples(
        self,
        inputs: Tuple[Any],
        pred: Any,
        conf: Union[np.array, np.ndarray],
        *args,
        **kwargs,
    ):
        """
        Formatting function for printing failed test examples.
        """
        if conf.shape[0] <= 4:
            confs = " ".join(["%.1f" % c for c in conf])
            ret = "%s %s" % (confs, str(inputs))
        else:
            conf = conf[pred]
            ret = "%s (%.1f) %s" % (pred, conf, str(inputs))
        return ret
Formatting function for printing failed test examples.
allennlp/confidence_checks/task_checklists/task_suite.py