docs: def write_summary(summary: dict, cache_dir: str):
      """Write the `summary` JSON to `cache_dir`.
  
      Updated the accessed timestamp to now before writing.
      """
      # update the summary last-accessed timestamp
      summary['accessed'] = time()
      with open(join(cache_dir, 'summary.json'), 'w') as summary_file:
          summary_file.write(json.dumps(summary, indent=4, sort_keys=True))