code: def main(args: argparse.Namespace):
      # Note: The automated generation call `build_catalog.build_catalog()`
      # directly, so no code should go in `main()`.
  
      catalog_dir = args.catalog_dir or os.path.join(
          tfds.core.utils.tfds_write_path(),
          "docs",
          "catalog",
      )
  
      build_catalog(
          datasets=args.datasets.split(",") if args.datasets else None,
          ds_collections=(
              args.ds_collections.split(",")
              if args.ds_collections
              else None
          ),
          catalog_dir=catalog_dir,
      )
  
file_path: datasets/tensorflow_datasets/scripts/documentation/build_catalog.py
imports: import argparse
  import collections
  import os
  from typing import Dict, List, Optional
  from absl import app
  from absl.flags import argparse_flags
  from etils import epath
  import tensorflow_datasets
  from tensorflow_datasets.scripts.documentation import doc_utils
  from tensorflow_datasets.scripts.documentation import document_datasets
  import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types