code: def main(args):
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "--library",
          choices=["cudnn", "cutensor", "nccl"],
          required=True,
          help="Library to install",
      )
      parser.add_argument(
          "--cuda", type=str, required=True, help="CUDA version"
      )
      parser.add_argument(
          "--prefix", type=str, default=None, help="Install destination"
      )
      parser.add_argument(
          "--action",
          choices=["install", "dump"],
          default="install",
          help="Action to perform",
      )
      params = parser.parse_args(args)
  
      if params.prefix is not None:
          params.prefix = os.path.abspath(params.prefix)
  
      if params.action == "install":
          install_lib(params.cuda, params.prefix, params.library)
      elif params.action == "dump":
          print(json.dumps(library_records[params.library], indent=4))
      else:
          assert False
  
imports: import argparse
  import json
  import os
  import platform
  import shutil
  import subprocess
  import sys
  import tempfile
  import urllib.request
label_desc: Use image node_id 12 for calling a global function with example usage: main(args) without return types