code: def test_indented_nav(self):
      nav_cfg = [
          {"Home": "index.md"},
          {
              "API Guide": [
                  {"Running": "api-guide/running.md"},
                  {"Testing": "api-guide/testing.md"},
                  {"Debugging": "api-guide/debugging.md"},
                  {
                      "Advanced": [
                          {"Part 1": "api-guide/advanced/part-1.md"},
                      ]
                  },
              ]
          },
          {
              "About": [
                  {"Release notes": "about/release-notes.md"},
                  {"License": "/license.html"},
              ]
          },
          {"External": "https://example.com/"},
      ]
      expected = dedent(
          """
              Page(title='Home', url='/')
              Section(title='API Guide')
                  Page(title='Running', url='/api-guide/running/')
                  Page(title='Testing', url='/api-guide/testing/')
                  Page(title='Debugging', url='/api-guide/debugging/')
                  Section(title='Advanced')
                      Page(title='Part 1', url='/api-guide/advanced/part-1/')
              Section(title='About')
                  Page(title='Release notes', url='/about/release-notes/')
                  Link(title='License', url='/license.html')
              Link(title='External', url='https://example.com/')
              """
      )
      cfg = load_config(nav=nav_cfg, site_url="http://example.com/")
      fs = [
          "index.md",
          "api-guide/running.md",
          "api-guide/testing.md",
          "api-guide/debugging.md",
          "api-guide/advanced/part-1.md",
          "about/release-notes.md",
      ]
      files = Files(
          [
              File(
                  s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls
              )
              for s in fs
          ]
      )
      site_navigation = get_navigation(files, cfg)
      self.assertEqual(str(site_navigation).strip(), expected)
      self.assertEqual(len(site_navigation.items), 4)
      self.assertEqual(len(site_navigation.pages), 6)
      self.assertEqual(
          repr(site_navigation.homepage), "Page(title='Home', url='/')"
      )
      self.assertIsNone(site_navigation.items[0].parent)
      self.assertEqual(site_navigation.items[0].ancestors, [])
      self.assertIsNone(site_navigation.items[1].parent)
      self.assertEqual(site_navigation.items[1].ancestors, [])
      self.assertEqual(len(site_navigation.items[1].children), 4)
      self.assertEqual(
          repr(site_navigation.items[1].children[0].parent),
          "Section(title='API Guide')",
      )
      self.assertEqual(
          site_navigation.items[1].children[0].ancestors,
          [site_navigation.items[1]],
      )
      self.assertEqual(
          repr(site_navigation.items[1].children[1].parent),
          "Section(title='API Guide')",
      )
      self.assertEqual(
          site_navigation.items[1].children[1].ancestors,
          [site_navigation.items[1]],
      )
      self.assertEqual(
          repr(site_navigation.items[1].children[2].parent),
          "Section(title='API Guide')",
      )
      self.assertEqual(
          site_navigation.items[1].children[2].ancestors,
          [site_navigation.items[1]],
      )
      self.assertEqual(
          repr(site_navigation.items[1].children[3].parent),
          "Section(title='API Guide')",
      )
      self.assertEqual(
          site_navigation.items[1].children[3].ancestors,
          [site_navigation.items[1]],
      )
      self.assertEqual(
          len(site_navigation.items[1].children[3].children), 1
      )
      self.assertEqual(
          repr(site_navigation.items[1].children[3].children[0].parent),
          "Section(title='Advanced')",
      )
      self.assertEqual(
          site_navigation.items[1].children[3].children[0].ancestors,
          [
              site_navigation.items[1].children[3],
              site_navigation.items[1],
          ],
      )
      self.assertIsNone(site_navigation.items[2].parent)
      self.assertEqual(len(site_navigation.items[2].children), 2)
      self.assertEqual(
          repr(site_navigation.items[2].children[0].parent),
          "Section(title='About')",
      )
      self.assertEqual(
          site_navigation.items[2].children[0].ancestors,
          [site_navigation.items[2]],
      )
      self.assertEqual(
          repr(site_navigation.items[2].children[1].parent),
          "Section(title='About')",
      )
      self.assertEqual(
          site_navigation.items[2].children[1].ancestors,
          [site_navigation.items[2]],
      )
      self.assertIsNone(site_navigation.items[3].parent)
      self.assertEqual(site_navigation.items[3].ancestors, [])
      self.assertIsNone(site_navigation.items[3].children)
  
imports: import sys
  import unittest
  from mkdocs.structure.files import File, Files, set_exclusions
  from mkdocs.structure.nav import Section, _get_by_type, get_navigation
  from mkdocs.structure.pages import Page
  from mkdocs.tests.base import dedent, load_config
label_desc: Use image node_id 8 for calling the SiteNavigationTests obj's underlying member method code with example usage: obj.test_indented_nav() without return types