code: def get_terms_in_glossary() -> list[str]:
      """Return list of terms in glossary.rst."""
      if len(SEARCH) > 0:
          return SEARCH
  
      terms = []
  
      track = False
      with open(glossary_file(), encoding="utf-8") as file:
          for line in file:
              if line.startswith(".. glossary::"):
                  track = True
                  continue
  
              # keep first word if line starts with 4 spaces a letter
              if (
                  track
                  and line.startswith("    ")
                  and line[4].isalpha()
              ):
                  # remove trailing \n
                  line = line.strip()
                  terms.append(line)
  
              if track and line.startswith(".."):
                  break
  
      # Also take the lower case version of terms
      terms.extend([term.lower() for term in terms])
      terms = list(set(terms))
  
      return terms
  
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 3 for calling a global function with example usage: get_terms_in_glossary() and returns: terms, SEARCH