code: def main(args):
      # Images information
      ngc_base = "nvcr.io/nvidia/merlin/"
  
      scriptdir = Path(__file__).parent
  
      jsonfile = scriptdir / "data.json"
      snippetsfile = scriptdir / "snippets.yaml"
      version = args.version
      force = False
  
      if args.file:
          jsonfile = os.path.abspath(args.file)
      if args.snippets:
          snippetsfile = os.path.abspath(args.snippets)
      if args.force is True:
          force = True
      if not version:
          version = get_yymm()
  
      if args.pr:
          repo = os.environ.get("REPO", r"NVIDIA-Merlin/Merlin")
          open_pr(repo, str(jsonfile), version)
          sys.exit(0)
  
      if not args.container:
          logger.error("container is a required argument")
          sys.exit(1)
  
      sniptext = {}
      with open(snippetsfile, "r", encoding="utf-8") as f:
          sniptext = yaml.safe_load(f)
          for k in SupportMatrixExtractor.standard_snippets:
              assert sniptext[k]
  
      img = ngc_base + args.container + ":" + version
  
      logger.info("Extracting information from: %s", img)
      xtr = SupportMatrixExtractor(
          ngc_base + args.container, version, jsonfile, force
      )
      xtr.from_json()
  
      if xtr.already_present() and force is False:
          logger.info(
              "...skipping because container is already in data."
          )
          return
  
      for k in xtr.standard_snippets:
          xtr.insert_snippet(k, sniptext[k])
  
      xtr.insert_snippet("release", version)
  
      xtr.get_from_env("SMX_COMPRESSED_SIZE", "compressedSize")
      xtr.get_from_cmd("du -sb / 2>/dev/null | cut -f1", "size")
      xtr.get_from_envfile("/etc/os-release", "PRETTY_NAME", "os")
      xtr.get_from_env("CUDA_VERSION", "cuda")
      xtr.get_from_python("rmm")
      xtr.get_from_python("cudf")
      xtr.get_from_env("CUDNN_VERSION", "cudnn")
      xtr.get_from_pip("nvtabular")
      xtr.get_from_pip("transformers4rec")
      xtr.get_from_pip("merlin.core")
      xtr.get_from_pip("merlin.systems")
      xtr.get_from_pip("merlin.models")
      xtr.get_from_pip("merlin.dataloader")
      xtr.get_from_python("distributed_embeddings")
      xtr.get_from_python("hugectr2onnx")
      xtr.get_from_python("hugectr")
      xtr.get_from_python("sparse_operation_kit")
      xtr.get_from_python("tensorflow", "tf")
      xtr.get_from_pip("torch", "pytorch")
      xtr.get_from_env("CUBLAS_VERSION", "cublas")
      xtr.get_from_env("CUFFT_VERSION", "cufft")
      xtr.get_from_env("CURAND_VERSION", "curand")
      xtr.get_from_env("CUSOLVER_VERSION", "cusolver")
      xtr.get_from_env("CUSPARSE_VERSION", "cusparse")
      xtr.get_from_env("CUTENSOR_VERSION", "cutensor")
      xtr.get_from_env("NVIDIA_TENSORFLOW_VERSION", "nvidia_tensorflow")
      xtr.get_from_env("NVIDIA_PYTORCH_VERSION", "nvidia_pytorch")
      xtr.get_from_env("OPENMPI_VERSION", "openmpi")
      xtr.get_from_env("TRT_VERSION", "tensorrt")
      xtr.get_from_env(
          "NVIDIA_TRITON_SERVER_BASE_VERSION", "base_container"
      )
      # xtr.get_from_cmd("cuobjdump /usr/local/hugectr/lib/libhuge_ctr_shared.so
      # | grep arch | sed -e \'s/.*sm_//\' | sed -e \'H;${x;s/\\n/, /g;s/^, //;p};d\'", "sm")
      # flake8: noqa
      xtr.get_from_cmd(
          "if [ ! -f /usr/local/hugectr/lib/libhuge_ctr_shared.so ]; then exit 1; fi; cuobjdump /usr/local/hugectr/lib/libhuge_ctr_shared.so | grep arch | sed -e 's/.*sm_//'",
          "sm",
      )
      xtr.get_from_cmd("cat /opt/tritonserver/TRITON_VERSION", "triton")
      xtr.get_from_cmd(
          'python -c "import sys;print(sys.version_info[0]);"',
          "python_major",
      )
  
      # Some hacks for the base container image
      if args.container == "merlin-training":
          xtr.insert_snippet("base_container", "Not applicable")
      elif args.container == "merlin-tensorflow-training":
          tf2_img = xtr.contdata["nvidia_tensorflow"]
          py_maj = xtr.contdata["python_major"]
          xtr.insert_snippet(
              "base_container",
              f"nvcr.io/nvidia/tensorflow:{tf2_img}-py{py_maj}",
          )
      elif args.container == "merlin-pytorch-training":
          pt_img = xtr.contdata["nvidia_pytorch"]
          py_maj = xtr.contdata["python_major"]
          xtr.insert_snippet(
              "base_container",
              f"nvcr.io/nvidia/pytorch:{pt_img}-py{py_maj}",
          )
      else:
          trtoss = xtr.contdata["base_container"]
          xtr.insert_snippet(
              "base_container", f"Triton version {trtoss}"
          )
  
      if version == "22.10":
          xtr.precise_override("hugectr", "4.0.0", "4.1.1")
  
      xtr.insert_snippet("timestamp_utc", dt.utcnow().isoformat())
      xtr.to_json_file()
  
      logger.info(json.dumps(xtr.contdata, sort_keys=True, indent=2))
  
imports: import argparse
  import json
  import logging
  import os
  import subprocess
  import sys
  from collections import defaultdict
  from datetime import date
  from datetime import datetime
  from pathlib import Path
  import yaml
  from github import Github
  from github.GithubException import GithubException
  from github.GitRef import GitRef
  from semver import VersionInfo
label_desc: Use image node_id 3 for calling a global function with example usage: main(args) without return types