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: str,
      conf: Union[np.array, np.ndarray],
      label: Optional[str] = None,
      *args,
      **kwargs,
  ):
      """
      Formatting function for printing failed test examples.
      """
      context, question = inputs
      ret = "Context: %s\nQuestion: %s\n" % (context, question)
      if label is not None:
          ret += "Original answer: %s\n" % label
      ret += "Predicted answer: %s\n" % pred
      return ret
  
imports: from typing import Optional, Iterable, Tuple, Union
  import itertools
  import numpy
  from checklist.editor import MunchWithAdd
  from checklist.test_suite import TestSuite
  from checklist.test_types import MFT
  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 QuestionAnsweringSuite obj's underlying member method code with example usage: obj._format_failing_examples(inputs, pred, conf, label) and returns: ret