code: def cmake(major: int, minor: int, patch: int) -> None:
      version = f"{major}.{minor}.{patch}"
      with open("CMakeLists.txt", "r") as fd:
          cmakelist = fd.read()
      pattern = r"project\(xgboost LANGUAGES .* VERSION ([0-9]+\.[0-9]+\.[0-9]+)\)"
      matched = re.search(pattern, cmakelist)
      assert (
          matched
      ), "Couldn't find the version string in CMakeLists.txt."
      print(matched.start(1), matched.end(1))
      cmakelist = (
          cmakelist[: matched.start(1)]
          + version
          + cmakelist[matched.end(1) :]
      )
      with open("CMakeLists.txt", "w") as fd:
          fd.write(cmakelist)
  
      with tempfile.TemporaryDirectory() as tmpdir:
          subprocess.call(["cmake", "-S", ".", "-B", tmpdir])
  
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 1 for calling a global function with example usage: cmake(major, minor, patch) without return types