code: def test_docstring_parameters():
      """Test module docstring formatting."""
      npd = pytest.importorskip("numpydoc")
      incorrect = []
      for name in public_modules:
          # Assert that by default we import all public names with `import mne`
          if name not in ("mne", "mne.gui"):
              extra = name.split(".")[1]
              assert hasattr(mne, extra)
          with _record_warnings():  # traits warnings
              module = __import__(name, globals())
          for submod in name.split(".")[1:]:
              module = getattr(module, submod)
          classes = inspect.getmembers(module, inspect.isclass)
          for cname, cls in classes:
              if cname.startswith("_"):
                  continue
              incorrect += check_parameters_match(cls, where=name)
              cdoc = npd.docscrape.ClassDoc(cls)
              for method_name in cdoc.methods:
                  method = getattr(cls, method_name)
                  incorrect += check_parameters_match(
                      method, cls=cls, where=name
                  )
              if (
                  hasattr(cls, "__call__")
                  and "of type object" not in str(cls.__call__)
                  and "of ABCMeta object" not in str(cls.__call__)
              ):
                  incorrect += check_parameters_match(
                      cls.__call__,
                      cls=cls,
                      where=name,
                  )
          functions = inspect.getmembers(module, inspect.isfunction)
          for fname, func in functions:
              if fname.startswith("_"):
                  continue
              incorrect += check_parameters_match(func, where=name)
      incorrect = sorted(list(set(incorrect)))
      if len(incorrect) > 0:
          raise AssertionError(
              f"{len(incorrect)} error{_pl(incorrect)} found:\n"
              + "\n".join(incorrect)
          )
  
file_path: mne-python/mne/tests/test_docstring_parameters.py
imports: import importlib
  import inspect
  import re
  from pathlib import Path
  from pkgutil import walk_packages
  import pytest
  import mne
  from mne.utils import _pl, _record_warnings
label_desc: Use image node_id 3 for calling a global function with example usage: test_docstring_parameters() without return types