code: def test_docstring(Estimator, method, request):
      base_import_path = Estimator.__module__
      import_path = [base_import_path, Estimator.__name__]
      if method is not None:
          import_path.append(method)
  
      import_path = ".".join(import_path)
  
      if not any(
          re.search(regex, import_path) for regex in DOCSTRING_WHITELIST
      ):
          request.applymarker(
              pytest.mark.xfail(
                  run=False, reason="TODO pass numpydoc validation"
              )
          )
  
      res = numpydoc_validation.validate(import_path)
  
      res["errors"] = list(filter_errors(res["errors"], method))
  
      if res["errors"]:
          msg = repr_errors(res, Estimator, method)
  
          raise ValueError(msg)
  
file_path: imbalanced-learn/maint_tools/test_docstring.py
imports: import importlib
  import inspect
  import pkgutil
  import re
  from inspect import signature
  from typing import Optional
  import pytest
  import imblearn
  from imblearn.utils.testing import all_estimators
label_desc: Use image node_id 7 for calling a global function with example usage: test_docstring(Estimator, method, request) without return types