code: def write_names_rst(citation: list[dict[str, str]]) -> None:
      """Write names.rst file."""
      print(f"Writing file: {names_rst()}")
      with open(names_rst(), "w", encoding="utf8") as f:
          header = """.. This file is automatically generated.
      Do not edit manually.
      If you want to add to add yourself to the list of authors,
      please edit CITATION.cff and run maint_tools/citation_cff_maint.py.
  
  """
          print(header, file=f)
  
          for i, author in enumerate(citation["authors"]):
              line = (
                  f'.. _{author["given-names"]} {author["family-names"]}: '
                  f'{author["website"]}'
              )
              print(line, file=f)
              if i < len(citation["authors"]) - 1:
                  print("", file=f)
  
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 7 for calling a global function with example usage: write_names_rst(citation) without return types