code: def check_jitify_version(compiler, settings):
      global _jitify_version
  
      try:
          cupy_jitify_include = _jitify_path
          # Unfortunately Jitify does not have any identifiable name (branch,
          # tag, etc), so we must use the commit here
          a = subprocess.run(
              " ".join(["git", "rev-parse", "--short", "HEAD"]),
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE,
              shell=True,
              cwd=cupy_jitify_include,
          )
          if a.returncode == 0:
              out = a.stdout.decode()[
                  :-1
              ]  # unlike elsewhere, out is a str here
          else:
              raise RuntimeError(
                  "Cannot determine Jitify version from git"
              )
      except Exception as e:
          utils.print_warning(
              "Cannot determine Jitify version\n{}".format(e)
          )
          # 0: Jitify is not built (makes no sense), -1: built with unknown ver
          out = -1
  
      _jitify_version = out
      settings["define_macros"].append(
          ("CUPY_JITIFY_VERSION_CODE", _jitify_version)
      )
      return True
  
imports: import contextlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import List, Set
  import cupy_builder
  import cupy_builder.install_utils
  from cupy_builder import _environment
  from cupy_builder._context import Context
label_desc: Use image node_id 23 for calling a global function with example usage: check_jitify_version(compiler, settings) and returns: True