code: def main(argv: List[str]) -> None:
      parser = argparse.ArgumentParser(
          description="Determined checkpoint GC"
      )
  
      parser.add_argument(
          "--version",
          action="version",
          version=f"Determined checkpoint GC, version {det.__version__}",
      )
      parser.add_argument(
          "--experiment-id",
          help="The experiment ID to run the GC job for",
      )
      parser.add_argument(
          "--log-level",
          default=os.getenv("DET_LOG_LEVEL", "INFO"),
          choices=["DEBUG", "INFO", "WARNING", "ERROR"],
          help="Set the logging level",
      )
      parser.add_argument(
          "--storage-config",
          type=json_file_arg,
          default=os.getenv("DET_STORAGE_CONFIG", {}),
          help="Storage config (JSON-formatted file)",
      )
      parser.add_argument(
          "--delete",
          type=json_file_arg,
          default=os.getenv("DET_DELETE", []),
          help="Checkpoints to delete (JSON-formatted file)",
      )
      parser.add_argument(
          "--globs",
          type=json_file_arg,
          default=os.getenv("DET_GLOB", []),
          help="Glob list to match against checkpoint list (JSON-formatted file)",
      )
      parser.add_argument(
          "--delete-tensorboards",
          action="store_true",
          default=os.getenv("DET_DELETE_TENSORBOARDS", False),
          help="Delete Tensorboards from storage",
      )
      parser.add_argument(
          "--dry-run",
          action="store_true",
          default=("DET_DRY_RUN" in os.environ),
          help="Do not actually delete any checkpoints from storage",
      )
  
      args = parser.parse_args(argv)
  
      logging.basicConfig(
          level=args.log_level,
          format="%(asctime)s:%(module)s:%(levelname)s: %(message)s",
      )
  
      logger.info(
          f"Determined checkpoint GC, version {det.__version__}"
      )
  
      storage_config = args.storage_config
      masked_config = json.dumps(
          det.util.mask_checkpoint_storage(storage_config)
      )
      logger.info(f"Using checkpoint storage: {masked_config}")
  
      storage_ids = [s.strip() for s in args.delete]
      globs = [s.strip() for s in args.globs]
  
      manager = storage.build(
          storage_config,
          container_path=constants.SHARED_FS_CONTAINER_PATH,
      )
  
      if len(storage_ids) > 0:
          storage_ids_to_resources = delete_checkpoints(
              manager, storage_ids, globs, dry_run=args.dry_run
          )
          patch_checkpoints(storage_ids_to_resources)
  
      if args.delete_tensorboards:
          tb_manager = tensorboard.build(
              os.environ["DET_CLUSTER_ID"],
              args.experiment_id,
              None,
              storage_config,
              container_path=constants.SHARED_FS_CONTAINER_PATH,
              async_upload=False,
              sync_on_close=False,
          )
          delete_tensorboards(tb_manager, dry_run=args.dry_run)
  
file_path: determined/harness/determined/exec/gc_checkpoints.py
imports: import argparse
  import json
  import logging
  import os
  import sys
  from typing import Any, Dict, List
  import urllib3
  import determined
  from determined import errors, tensorboard
  from determined.common import api, constants, storage, util
  from determined.common.api import bindings, certs
label_desc: Use image node_id 5 for calling a global function with example usage: main(argv) without return types