code: def _form_examples_per_testcase_for_viz(
      self,
      xs,
      preds,
      confs,
      expect_results,
      labels=None,
      meta=None,
      nsamples=3,
  ):
      result = self._extract_examples_per_testcase(
          xs,
          preds,
          confs,
          expect_results,
          labels,
          meta,
          nsamples,
          only_include_fail=False,
      )
      if not result:
          return []
      idxs, iters, expect_results_sample = result
      if not iters:
          return []
      start_idx = 1 if self.print_first else 0
      if self.print_first:
          base = iters[0]
          try:
              conf = base[2][base[1]]
          except:
              conf = None
          old_example = {
              "text": base[0],
              "pred": str(base[1]),
              "conf": conf,
          }
      else:
          old_example = None
  
      examples = []
      for idx, e in enumerate(iters[start_idx:]):
          try:
              conf = e[2][e[1]]
          except:
              conf = None
          example = {
              "new": {"text": e[0], "pred": str(e[1]), "conf": conf},
              "old": old_example,
              "label": e[3],
              "succeed": int(
                  expect_results_sample[start_idx:][idx] > 0
              ),
          }
          examples.append(example)
      return examples
  
imports: from abc import ABC, abstractmethod
  import dill
  from munch import Munch
  import numpy
  import inspect
  from .expect import iter_with_optional, Expect
  from .viewer.test_summarizer import TestSummarizer
label_desc: Use image node_id 25 for calling the AbstractTest obj's underlying member method code with example usage: obj._form_examples_per_testcase_for_viz(xs, preds, confs, expect_results, labels, meta, nsamples) and returns: examples, list, list