code: def test_docstring_parameters():
      """Test module docstring formatting."""
      from numpydoc import docscrape
  
      incorrect = []
      for name in public_modules:
          # Assert that by default we import all public names with `import vispy`
          # if name not in ('vispy'):
          #    extra = name.split('.')[1]
          #    assert hasattr(vispy, extra)
          with pytest.warns(None):  # 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)
              cdoc = docscrape.ClassDoc(cls)
              for method_name in cdoc.methods:
                  method = getattr(cls, method_name)
                  incorrect += check_parameters_match(method, cls=cls)
              if hasattr(
                  cls, "__call__"
              ) and "of type object" not in str(cls.__call__):
                  incorrect += check_parameters_match(cls.__call__, cls)
          functions = inspect.getmembers(module, inspect.isfunction)
          for fname, func in functions:
              if fname.startswith("_"):
                  continue
              incorrect += check_parameters_match(func)
      incorrect = sorted(list(set(incorrect)))
      msg = "\n" + "\n".join(incorrect)
      msg += "\n%d error%s" % (
          len(incorrect),
          "s" if len(incorrect) == 1 else "",
      )
      if len(incorrect) > 0:
          raise AssertionError(msg)
  
file_path: vispy/vispy/util/tests/test_docstring_parameters.py
imports: import re
  import inspect
  import pytest
  import vispy.scene.cameras.magnify
  from vispy.testing import run_tests_if_main, requires_numpydoc
label_desc: Use image node_id 3 for calling a global function with example usage: test_docstring_parameters() without return types