docs: def fmt_error_types(hyps: Sequence[Sequence[str]],
                      refs: Sequence[Sequence[str]]
                     ) -> str:
      """ Format some information about different error types: insertions, deletions and substitutions."""
  
      alignments = [min_edit_distance_align(ref, hyp)
                    for hyp, ref in zip(hyps, refs)]
  
      arrow_counter = Counter() # type: Dict[Tuple[str, str], int]
      for alignment in alignments:
          arrow_counter.update(alignment)
      sub_count = sum([count for arrow, count in arrow_counter.items()
                  if arrow[0] != arrow[1] and arrow[0] != "" and arrow[1] != ""])
      dels = [(arrow[0], count) for arrow, count in arrow_counter.items()
              if arrow[0] != arrow[1] and arrow[0] != "" and arrow[1] == ""]
      del_count = sum([count for arrow, count in dels])
      ins_count = sum([count for arrow, count in arrow_counter.items()
                  if arrow[0] != arrow[1] and arrow[0] == "" and arrow[1] != ""])
      total = sum([count for _, count in arrow_counter.items()])
  
      fmt_pieces = []
      fmt = "{:15}{:<4}\n"
      fmt_pieces.append(fmt.format("Substitutions", sub_count))
      fmt_pieces.append(fmt.format("Deletions", del_count))
      fmt_pieces.append(fmt.format("Insertions", ins_count))
      fmt_pieces.append("\n")
      fmt_pieces.append("Deletions:\n")
      fmt_pieces.extend(["{:4}{:<4}\n".format(label, count)
                         for label, count in
                         sorted(dels, reverse=True, key=lambda x: x[1])])
  
      return "".join(fmt_pieces)