code: def write_api_file() -> None:
      print("Updating API docs\n  ->{}".format(API_FILENAME))
      sep = "\n   "
      with open(API_FILENAME, "w") as f:
          f.write(
              API_TEMPLATE.format(
                  toplevel_charts=sep.join(toplevel_charts()),
                  api_functions=sep.join(api_functions()),
                  encoding_wrappers=sep.join(encoding_wrappers()),
                  lowlevel_wrappers=sep.join(lowlevel_wrappers()),
              )
          )
  
file_path: altair/tools/generate_api_docs.py
imports: import sys
  import types
  from os.path import abspath, dirname, join
  from typing import Final, Optional, Iterator, List
  from types import ModuleType
  import altair
label_desc: Use image node_id 6 for calling a global function with example usage: write_api_file() without return types