    def _diff_up(
        self,
        orig_pred: int,
        pred: int,
        orig_conf: np.ndarray,
        conf: np.ndarray,
        labels: Optional[int] = None,
        meta: Optional[List] = None,
    ) -> Union[bool, float]:
        """
        These arguments are expected by `checklist.expect.Expect.pairwise` function.
        We only use `orig_conf` and `conf` in this case.

        `orig_conf` is the confidence score of the first example in a test's input data pair.

        A `bool` output indicates whether the test passed the expectation (always
        `True` in this function's case).

        A `float` output indicates the magnitude of the failure.
        """
        tolerance = 0.1
        change = self._positive_change(orig_conf, conf)
        if change + tolerance >= 0:
            return True
        else:
            return change + tolerance
These arguments are expected by `checklist.expect.Expect.pairwise` function.
We only use `orig_conf` and `conf` in this case.

`orig_conf` is the confidence score of the first example in a test's input data pair.

A `bool` output indicates whether the test passed the expectation (always
`True` in this function's case).

A `float` output indicates the magnitude of the failure.
allennlp/confidence_checks/task_checklists/sentiment_analysis_suite.py