docs: def generate_url_map(yaml_path=TOC_PATH) -> dict:
      """
      Generates mapping from each URL to its previous and next URLs in the
      textbook. The dictionary looks like:
  
      {
          'ch/10/some_page.html' : {
              'prev': 'ch/09/foo.html',
              'next': 'ch/10/bar.html',
          },
          ...
      }
      """
      with open(yaml_path) as f:
          data = yaml.load(f)
  
      pipeline = [
          t.remove(_not_internal_link),
          flatmap(_flatten_sections),
          t.map(t.get('url')), list, _sliding_three,
          t.map(_adj_pages),
          t.merge()
      ]
      return t.pipe(data, *pipeline)