code: def test_autosummary_module_all(app, status, warning):
      try:
          app.build()
          # generated/foo is generated successfully
          assert app.env.get_doctree(
              "generated/autosummary_dummy_package_all"
          )
          module = (
              app.srcdir
              / "generated"
              / "autosummary_dummy_package_all.rst"
          ).read_text(encoding="utf8")
          assert (
              "   .. autosummary::\n"
              "   \n"
              "      PublicBar\n"
              "   \n" in module
          )
          assert (
              "   .. autosummary::\n"
              "   \n"
              "      public_foo\n"
              "      public_baz\n"
              "   \n" in module
          )
          assert (
              ".. autosummary::\n"
              "   :toctree:\n"
              "   :recursive:\n\n"
              "   autosummary_dummy_package_all.extra_dummy_module\n\n"
              in module
          )
      finally:
          sys.modules.pop("autosummary_dummy_package_all", None)
  
imports: import sys
  from io import StringIO
  from pathlib import Path
  from unittest.mock import Mock, patch
  import pytest
  from docutils import nodes
  from sphinx import addnodes
  from sphinx.ext.autosummary import autosummary_table, autosummary_toc, extract_summary, import_by_name, mangle_signature
  from sphinx.ext.autosummary.generate import AutosummaryEntry, generate_autosummary_content, generate_autosummary_docs
  from sphinx.ext.autosummary.generate import main
  from sphinx.testing.util import assert_node, etree_parse
  from sphinx.util.docutils import new_document
label_desc: Use image node_id 22 for calling a global function with example usage: test_autosummary_module_all(app, status, warning) without return types