code: def test_documented():
      """Test that public functions and classes are documented."""
      public_modules_ = public_modules[:]
  
      doc_file = op.abspath(
          op.join(op.dirname(__file__), "..", "..", "doc", "api.rst")
      )
      if not op.isfile(doc_file):
          raise SkipTest("Documentation file not found: %s" % doc_file)
      known_names = list()
      with open(doc_file, "rb") as fid:
          for line in fid:
              line = line.decode("utf-8")
              if not line.startswith("  "):  # at least two spaces
                  continue
              line = line.split()
              if len(line) == 1 and line[0] != ":":
                  known_names.append(line[0].split(".")[-1])
      known_names = set(known_names)
  
      missing = []
      for name in public_modules_:
          with warnings.catch_warnings(record=True):  # traits warnings
              module = __import__(name, globals())
          for submod in name.split(".")[1:]:
              module = getattr(module, submod)
          classes = inspect.getmembers(module, inspect.isclass)
          functions = inspect.getmembers(module, inspect.isfunction)
          checks = list(classes) + list(functions)
          for name, cf in checks:
              if not name.startswith("_") and name not in known_names:
                  from_mod = inspect.getmodule(cf).__name__
                  if (
                      from_mod.startswith("celer")
                      and from_mod not in documented_ignored_mods
                      and name not in documented_ignored_names
                  ):
                      missing.append(
                          "%s (%s.%s)" % (name, from_mod, name)
                      )
      if len(missing) > 0:
          raise AssertionError(
              "\n\nFound new public members missing from "
              "doc/python_reference.rst:\n\n* "
              + "\n* ".join(sorted(set(missing)))
          )
  
file_path: celer/celer/tests/test_docstring_parameters.py
imports: import inspect
  import os.path
  import re
  import sys
  from unittest import SkipTest
  import warnings
  from pkgutil import walk_packages
  from inspect import getsource
  from numpydoc import docscrape
  import celer
label_desc: Use image node_id 5 for calling a global function with example usage: test_documented() without return types