def docstring_with_summary(docstring, pairs, key_header, summary_type):
  """ Return a string joining the docstring with the pairs summary table. """
  return "\n".join(
    [docstring, "Summary of {}:".format(summary_type), ""] +
    summary_table(pairs, key_header) + [""]
  )
Return a string joining the docstring with the pairs summary table.