code: def main(args: argparse.Namespace) -> None:
      check_path()
  
      rel = version.parse(args.release)
      assert isinstance(rel, version.Version)
  
      major = rel.major
      minor = rel.minor
      patch = rel.micro
  
      print("Release:", rel)
      if not rel.is_prerelease:
          # Major release
          rc: Optional[str] = None
          rc_ver: Optional[int] = None
      else:
          # RC release
          major = rel.major
          minor = rel.minor
          patch = rel.micro
          assert rel.pre is not None
          rc, rc_ver = rel.pre
          assert rc == "rc"
  
      release = str(major) + "." + str(minor) + "." + str(patch)
      if args.branch is not None:
          branch = args.branch
      else:
          branch = "release_" + str(major) + "." + str(minor) + ".0"
  
      git.clean("-xdf")
      git.checkout(branch)
      git.pull("origin", branch)
      git.submodule("update")
      commit_hash = latest_hash()
  
      outdir = os.path.abspath(args.outdir)
      if not os.path.exists(outdir):
          os.mkdir(outdir)
  
      # source tarball
      hashes: List[str] = []
      tarname, h = make_src_package(release, outdir)
      hashes.append(h)
  
      # CUDA R packages
      urls, hr = download_r_packages(
          release,
          branch,
          "" if rc is None else rc + str(rc_ver),
          commit_hash,
          outdir,
      )
      hashes.extend(hr)
  
      # Python source wheel
      make_pysrc_wheel(release, rc, rc_ver, outdir)
  
      # Python binary wheels
      download_py_packages(branch, major, minor, commit_hash, outdir)
  
      # Write end note
      release_note(release, hashes, urls, tarname, outdir)
  
imports: import argparse
  import os
  import shutil
  import subprocess
  import tarfile
  import tempfile
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Tuple, Union
  from urllib.request import urlretrieve
  import tqdm
  from packaging import version
  from sh.contrib import git
label_desc: Use image node_id 11 for calling a global function with example usage: main(args) without return types