code: def test_code_block_dedent(app, status, warning):
      app.build(filenames=[app.srcdir / "dedent.rst"])
      doctree = app.env.get_doctree("dedent")
      codeblocks = list(doctree.findall(nodes.literal_block))
      # Note: comparison string should not have newlines at the beginning or end
      text_0_indent = """First line
  Second line
      Third line
  Fourth line"""
      text_2_indent = """  First line
    Second line
        Third line
    Fourth line"""
      text_4_indent = """    First line
      Second line
          Third line
      Fourth line"""
  
      assert codeblocks[0].astext() == text_0_indent
      assert codeblocks[1].astext() == text_0_indent
      assert codeblocks[2].astext() == text_4_indent
      assert codeblocks[3].astext() == text_2_indent
      assert codeblocks[4].astext() == text_4_indent
      assert codeblocks[5].astext() == text_0_indent
  
imports: import os.path
  import pytest
  from docutils import nodes
  from sphinx.config import Config
  from sphinx.directives.code import LiteralIncludeReader
  from sphinx.testing.util import etree_parse
label_desc: Use image node_id 43 for calling a global function with example usage: test_code_block_dedent(app, status, warning) without return types