code: def make_report(explanations, cap_lines_at=5):
      report = defaultdict(list)
      for origin, locations in explanations.items():
          report_lines = [
              f"        {fname}:{lineno}" for fname, lineno in locations
          ]
          report_lines.sort(
              key=lambda line: (line.startswith(LIB_DIR), line)
          )
          if len(report_lines) > cap_lines_at + 1:
              msg = "        (and {} more with settings.verbosity >= verbose)"
              report_lines[cap_lines_at:] = [
                  msg.format(len(report_lines[cap_lines_at:]))
              ]
          if (
              report_lines
          ):  # We might have filtered out every location as uninformative.
              report[origin] = list(EXPLANATION_STUB) + report_lines
      return report
  
imports: import functools
  import os
  import subprocess
  import sys
  import types
  from collections import defaultdict
  from functools import lru_cache, reduce
  from os import sep
  from pathlib import Path
  from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple
  from hypothesis._settings import Phase, Verbosity
  from hypothesis.internal.escalation import is_hypothesis_file
label_desc: Use image node_id 3 for calling a global function with example usage: make_report(explanations, cap_lines_at) and returns: report