code: def test_nav_with_exclusion(self):
      expected = dedent(
          """
              Page(title=[blank], url='index.html')
              Section(title='About')
                  Page(title=[blank], url='about/license.html')
                  Page(title=[blank], url='about/release-notes.html')
              Section(title='Api guide')
                  Page(title=[blank], url='api-guide/running.html')
                  Page(title=[blank], url='api-guide/testing.html')
              """
      )
      cfg = load_config(
          use_directory_urls=False, not_in_nav="*ging.md\n/foo.md\n"
      )
      fs = [
          "index.md",
          "foo.md",
          "about/license.md",
          "about/release-notes.md",
          "api-guide/debugging.md",
          "api-guide/running.md",
          "api-guide/testing.md",
      ]
      files = Files(
          [
              File(
                  s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls
              )
              for s in fs
          ]
      )
      set_exclusions(files, cfg)
      site_navigation = get_navigation(files, cfg)
      self.assertEqual(str(site_navigation).strip(), expected)
      self.assertEqual(len(site_navigation.items), 3)
      self.assertEqual(len(site_navigation.pages), 5)
  
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 14 for calling the SiteNavigationTests obj's underlying member method code with example usage: obj.test_nav_with_exclusion() without return types