code: def write_authors_file(authors: list[dict[str, str]]) -> None:
      """Write AUTHORS.rst file."""
      authors_file_content = read_authors_file()
      print(f"Writing file: {authors_file()}")
      with open(authors_file(), "w", encoding="utf8") as f:
          writing_team_section = False
          for line in authors_file_content:
              if ".. CORE DEV SECTION STARTS HERE" in line:
                  writing_team_section = True
                  write_team_section(f, authors)
              if "Funding" in line:
                  writing_team_section = False
              if not writing_team_section:
                  f.write(line)
  
file_path: nilearn/maint_tools/citation_cff_maint.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import Any
  import ruamel.yaml
label_desc: Use image node_id 9 for calling a global function with example usage: write_authors_file(authors) without return types