code: def main():
      yaml = YAML()
      opts = parse_args()
  
      source_yaml = yaml.load(Path(opts.source_yaml))
  
      nav_entries = build_api_toc(
          Path(opts.api_docs_path), Path(opts.docs_root)
      )
  
      # Add version to name.
      source_yaml["site_name"] = f"AllenNLP {opts.docs_version}"
  
      # Find the yaml sub-object corresponding to the API table of contents.
      site_nav = source_yaml["nav"]
      for nav_obj in site_nav:
          if API_TOC_KEY in nav_obj:
              break
      nav_obj[API_TOC_KEY] = nav_entries
  
      with open(opts.target_yaml, "w") as f:
          yaml.dump(source_yaml, f)
  
      print(f"{opts.target_yaml} created")
  
file_path: allennlp/scripts/build_docs_config.py
imports: import argparse
  from pathlib import Path
  from typing import Any, List
  from ruamel.yaml import YAML
  from allennlp.version import VERSION
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types