code: def test_skip_module_member(app):
      def autodoc_skip_member(app, what, name, obj, skip, options):
          if name == "Class":
              return True  # Skip "Class" class in __all__
          elif name == "raises":
              return False  # Show "raises()" function (not in __all__)
          return None
  
      app.connect("autodoc-skip-member", autodoc_skip_member)
  
      options = {"members": None}
      actual = do_autodoc(app, "module", "target", options)
      assert list(actual) == [
          "",
          ".. py:module:: target",
          "",
          "",
          ".. py:function:: raises(exc, func, *args, **kwds)",
          "   :module: target",
          "",
          "   Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.",
          "",
      ]
  
file_path: sphinx/tests/test_extensions/test_ext_autodoc_events.py
imports: import pytest
  from sphinx.ext.autodoc import between, cut_lines
  from tests.test_extensions.test_ext_autodoc import do_autodoc
label_desc: Use image node_id 6 for calling a global function with example usage: test_skip_module_member(app) and returns: None, True, False