class_docstr: Builder that outputs epub3 files.
  
  It creates the metainfo files content.opf, nav.xhtml, toc.ncx, mimetype,
  and META-INF/container.xml. Afterwards, all necessary files are zipped to
  an epub file.
class_docstr_tok: ["Builder","that","outputs","epub3","files",".","It","creates","the","metainfo","files","content.opf",",","nav.xhtml",",","toc.ncx",",","mimetype",",","and","META-INF\/container.xml",".","Afterwards",",","all","necessary","files","are","zipped","to","an","epub","file","."]
docstr: Create the toc navigation structure.
  
  This method is almost same as build_navpoints method in epub.py.
  This is because the logical navigation structure of epub3 is not
  different from one of epub2.
  
  The difference from build_navpoints method is templates which are used
  when generating navigation documents.
docstr_tok: ["Create","the","toc","navigation","structure",".","This","method","is","almost","same","as","build_navpoints","method","in","epub.py",".","This","is","because","the","logical","navigation","structure","of","epub3","is","not","different","from","one","of","epub2",".","The","difference","from","build_navpoints","method","is","templates","which","are","used","when","generating","navigation","documents","."]
code: def build_navlist(
      self, navnodes: list[dict[str, Any]]
  ) -> list[NavPoint]:
      """Create the toc navigation structure.
  
      This method is almost same as build_navpoints method in epub.py.
      This is because the logical navigation structure of epub3 is not
      different from one of epub2.
  
      The difference from build_navpoints method is templates which are used
      when generating navigation documents.
      """
      navstack: list[NavPoint] = []
      navstack.append(NavPoint("", "", []))
      level = 0
      for node in navnodes:
          if not node["text"]:
              continue
          file = node["refuri"].split("#")[0]
          if file in self.ignored_files:
              continue
          if node["level"] > self.config.epub_tocdepth:
              continue
  
          navpoint = NavPoint(node["text"], node["refuri"], [])
          if node["level"] == level:
              navstack.pop()
              navstack[-1].children.append(navpoint)
              navstack.append(navpoint)
          elif node["level"] == level + 1:
              level += 1
              navstack[-1].children.append(navpoint)
              navstack.append(navpoint)
          elif node["level"] < level:
              while node["level"] < len(navstack):
                  navstack.pop()
              level = node["level"]
              navstack[-1].children.append(navpoint)
              navstack.append(navpoint)
          else:
              unreachable = (
                  "Should never reach here. It might be a bug."
              )
              raise RuntimeError(unreachable)
  
      return navstack[0].children
  
imports: from __future__ import annotations
  import html
  import os
  import re
  import time
  from os import path
  from typing import TYPE_CHECKING, Any, NamedTuple
  from sphinx import package_dir
  from sphinx.builders import _epub_base
  from sphinx.config import ENUM, Config
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.fileutil import copy_asset_file
  from sphinx.util.osutil import make_filename
label_desc: Use image node_id 4 for calling the Epub3Builder obj's underlying member method code with example usage: obj.build_navlist(navnodes) and returns: navstack