docstr: Formatting function for printing failed test examples.
docstr_tok: ["Formatting","function","for","printing","failed","test","examples","."]
code: def _format_failing_examples(
      self,
      inputs: Tuple,
      pred: int,
      conf: Union[np.array, np.ndarray],
      label: Optional[int] = None,
      *args,
      **kwargs,
  ):
      """
      Formatting function for printing failed test examples.
      """
      labels = {
          self._entails: "Entails",
          self._contradicts: "Contradicts",
          self._neutral: "Neutral",
      }
      ret = "Premise: %s\nHypothesis: %s" % (inputs[0], inputs[1])
      if label is not None:
          ret += "\nOriginal: %s" % labels[label]
      ret += (
          "\nPrediction: Entails (%.1f), Contradicts (%.1f), Neutral (%.1f)"
          % (
              conf[self._entails],
              conf[self._contradicts],
              conf[self._neutral],
          )
      )
  
      return ret
  
imports: from typing import Optional, Tuple, Iterable, Callable, Union
  import itertools
  import numpy
  from checklist.test_suite import TestSuite
  from checklist.test_types import MFT, INV, DIR, Expect
  from checklist.perturb import Perturb
  from allennlp.confidence_checks.task_checklists.task_suite import TaskSuite
  from allennlp.confidence_checks.task_checklists import utils
  from allennlp.predictors import Predictor
label_desc: Use image node_id 3 for calling the TextualEntailmentSuite obj's underlying member method code with example usage: obj._format_failing_examples(inputs, pred, conf, label) and returns: ret