code: def test_autosectionlabel_maxdepth(app, status, warning):
      app.build(force_all=True)
  
      content = (app.outdir / "index.html").read_text(encoding="utf8")
  
      # depth: 1
      html = (
          '<li><p><a class="reference internal" href="#test-ext-autosectionlabel">'
          '<span class=".*?">test-ext-autosectionlabel</span></a></p></li>'
      )
      assert re.search(html, content, re.S)
  
      # depth: 2
      html = (
          '<li><p><a class="reference internal" href="#installation">'
          '<span class="std std-ref">Installation</span></a></p></li>'
      )
      assert re.search(html, content, re.S)
  
      # depth: 3
      html = (
          '<li><p><a class="reference internal" href="#for-windows-users">'
          '<span class="std std-ref">For Windows users</span></a></p></li>'
      )
      assert re.search(html, content, re.S)
  
      # depth: 4
      html = (
          '<li><p><span class="xref std std-ref">Linux</span></p></li>'
      )
      assert re.search(html, content, re.S)
  
      assert "WARNING: undefined label: 'linux'" in warning.getvalue()
  
imports: import re
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_autosectionlabel_maxdepth(app, status, warning) without return types