code: def get_navpanel_data(kwdb):
      
      data = kwdb.get_keyword_hierarchy()
      for library in data:
          library["url"] = flask.url_for(".doc_for_library", collection_id=library["collection_id"])
          for keyword in library["keywords"]:
              url = flask.url_for(".doc_for_library",
                                  collection_id=library["collection_id"],
                                  keyword=keyword["name"])
              keyword["url"] = url
  
      return data
docs: Get navpanel data from kwdb, and add urls necessary for hyperlinks