code: def main(args: argparse.Namespace) -> None:
      major = args.major
      minor = args.minor
      patch = args.patch
      rc = args.rc
      is_rc = args.is_rc
      is_dev = args.is_dev
      if is_rc and is_dev:
          raise ValueError("It cannot be both a rc and a dev branch.")
      if is_rc:
          assert rc >= 1, "RC version starts from 1."
      else:
          assert rc == 0, "RC is not used."
  
      cmake(major, minor, patch)
      pypkg(major, minor, patch, rc, is_rc, is_dev)
      rpkg(major, minor, patch, is_dev=is_dev)
      jvmpkgs(major, minor, patch, rc, is_rc, is_dev)
  
      print(
          """
  
  Please examine the changes and commit. Be aware that mvn might leave backup files in the
  source tree.
  
  """
      )
  
file_path: xgboost/tests/ci_build/change_version.py
imports: import argparse
  import datetime
  import os
  import re
  import subprocess
  import sys
  import tempfile
  from test_utils import JVM_PACKAGES, PY_PACKAGE, R_PACKAGE, ROOT, cd
label_desc: Use image node_id 5 for calling a global function with example usage: main(args) without return types