code: def _add_parent_links(nav) -> None:
      for item in nav:
          if item.is_section:
              for child in item.children:
                  child.parent = item
              _add_parent_links(item.children)
  
imports: from __future__ import annotations
  import logging
  from typing import TYPE_CHECKING, Iterator, TypeVar
  from urllib.parse import urlsplit
  from mkdocs.exceptions import BuildError
  from mkdocs.structure import StructureItem
  from mkdocs.structure.pages import Page, _AbsoluteLinksValidationValue
  from mkdocs.utils import nest_paths
label_desc: Use image node_id 4 for calling a global function with example usage: _add_parent_links(nav) without return types