def prune_summary(summary, prefixes_to_remove):
  """Removes keys starting with provided prefixes from the dict."""
  ret = {}
  for key in summary.keys():
    report_key = True
    for prefix in prefixes_to_remove:
      if key.startswith(prefix):
        report_key = False
        break
    if report_key:
      ret[key] = summary[key]
  return ret