code: def check_string(string: str, term: str) -> bool:
      """Check a string for a term."""
      if string is None:
          return False
      return (
          f" {term} " in string
          or string.startswith(f"{term} ")
          or string.endswith(f" {term}")
      ) and f":term:`{term}`" not in string
  
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 6 for calling a global function with example usage: check_string(string, term) and returns: unknown, False