code: def check_docstring(docstring, terms):
      """Check docstring content."""
      docstring = parse(docstring, style=DocstringStyle.NUMPYDOC)
  
      text = check_description(docstring, terms)
  
      for param in docstring.params:
          if tmp := [
              term
              for term in terms
              if check_string(param.description, term)
          ]:
              text += f" terms: '{', '.join(tmp)}' in param '{param.arg_name}'\n"
  
      for return_arg in docstring.many_returns:
          if tmp := [
              term
              for term in terms
              if check_string(return_arg.description, term)
          ]:
              text += (
                  f" terms: '{', '.join(tmp)}' "
                  "in return arg param '{return_arg.return_name}'\n"
              )
  
      return text
  
file_path: nilearn/maint_tools/check_glossary_term.py
imports: from __future__ import annotations
  import ast
  from pathlib import Path
  from docstring_parser import parse
  from docstring_parser.common import DocstringStyle
  from rich import print
label_desc: Use image node_id 7 for calling a global function with example usage: check_docstring(docstring, terms) and returns: text